This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/22052] [4.0/4.1 Regression] redefinition of inline function succeeds


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]