This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/23103] [4.0/4.1 Regression] gcc_diag does not work with -combine
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Oct 2005 18:29:48 -0000
- Subject: [Bug c/23103] [4.0/4.1 Regression] gcc_diag does not work with -combine
- References: <bug-23103-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from pinskia at gcc dot gnu dot org 2005-10-15 18:29 -------
Here is the fix which I need to test still:
Index: c-format.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-format.c,v
retrieving revision 1.84
diff -u -p -r1.84 c-format.c
--- c-format.c 22 Jul 2005 17:10:34 -0000 1.84
+++ c-format.c 15 Oct 2005 18:29:26 -0000
@@ -2216,7 +2216,7 @@ check_format_types (format_wanted_type *
|| 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.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23103