re PR c/23103 (gcc_diag does not work with -combine)
authorAndrew Pinski <pinskia@physics.uc.edu>
Wed, 26 Oct 2005 02:15:02 +0000 (02:15 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Wed, 26 Oct 2005 02:15:02 +0000 (19:15 -0700)
2005-10-24  Andrew Pinski  <pinskia@physics.uc.edu>

        PR c/23103
        * c-format.c (check_format_types): Use lang_hooks.types_compatible_p
        instead of pointer equality when comparing types.

From-SVN: r105911

gcc/ChangeLog
gcc/c-format.c

index d63624042b39cec465eaac0a2621069334dd47b1..792d79514b99ac473a6cb48238a62297665cc611 100644 (file)
@@ -1,3 +1,9 @@
+2005-10-24  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR c/23103
+       * c-format.c (check_format_types): Use lang_hooks.types_compatible_p
+       instead of pointer equality when comparing types.
+
 2005-10-24  James E. Wilson  <wilson@specifix.com>
 
        * sched-deps.c (flush_pending_lists): Pass 1 not 0 in first two
index 7d5af422eb5962672ca7f8fe8effa1bbc67aed4a..82f2bc77b0fd37d745381b86ab7893d01273ca4e 100644 (file)
@@ -2216,7 +2216,7 @@ check_format_types (format_wanted_type *types, const char *format_start,
                          || cur_type == unsigned_char_type_node);
 
       /* Check the type of the "real" argument, if there's a type we want.  */
-      if (wanted_type == cur_type)
+      if (lang_hooks.types_compatible_p (wanted_type, cur_type))
        continue;
       /* If we want 'void *', allow any pointer type.
         (Anything else would already have got a warning.)