[Bug c/22052] [4.0/4.1 Regression] redefinition of inline function succeeds
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Jun 13 19:35:00 GMT 2005
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-13 19:35 -------
This patch should fix it (I don't have time right now, school is getting in the way, could you test it):
Index: c-decl.c
===============================================================
====
RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
retrieving revision 1.662
diff -u -p -r1.662 c-decl.c
--- c-decl.c 6 Jun 2005 19:31:24 -0000 1.662
+++ c-decl.c 13 Jun 2005 19:35:08 -0000
@@ -1318,9 +1318,7 @@ diagnose_mismatched_decls (tree newdecl,
return false;
}
/* If both decls have not extern inline, reject the new decl. */
- if (!DECL_DECLARED_INLINE_P (olddecl)
- && !DECL_EXTERNAL (olddecl)
- && !DECL_DECLARED_INLINE_P (newdecl)
+ if (!DECL_EXTERNAL (olddecl)
&& !DECL_EXTERNAL (newdecl))
{
error ("%Jredefinition of %qD", newdecl, newdecl);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22052
More information about the Gcc-bugs
mailing list