This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15774] Conflicting function decls not diagnosed
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jun 2004 07:40:42 -0000
- Subject: [Bug c++/15774] Conflicting function decls not diagnosed
- References: <20040602105408.15774.dannysmith@users.sourceforge.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From giovannibajo at libero dot it 2004-06-28 07:40 -------
I think the idea is that if you *ADD* an attribute in a later redeclaration,
you should get an error (like in your testcase), but if you omit it in the
redeclaration it is ok (the attribute is implicit in that case).
// OK
void foo(void) stdcall;
void foo(void) {}
// OK
void bar(void) stdcall;
void bar(void) stdcall {}
// ERROR
void foobar(void);
void foobar(void) stdcall {}
Jason, would you kindly comment on this? We need to know which way to proceed
with this patch.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15774