This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13140] New: declaration in global namespace, definition inside named or anon namespace
- From: "phil dot el at wanadoo dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Nov 2003 19:49:03 -0000
- Subject: [Bug c++/13140] New: declaration in global namespace, definition inside named or anon namespace
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc accept this illegal code, at least with 2.91, 2.95.3 and
gcc version 3.4 20031120 (experimental) so this is not a
regression
struct foo {
foo();
};
namespace bar {
foo::foo() { }
}
Comeau catch it at foo::foo() definition
error: overloaded function "foo::foo" cannot be defined in the current scope
regards,
Philippe Elie
--
Summary: declaration in global namespace, definition inside named
or anon namespace
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: phil dot el at wanadoo dot fr
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13140