[Bug c++/17421] New: g++ accepts invalid qualified declarator-id
ppluzhnikov at charter dot net
gcc-bugzilla@gcc.gnu.org
Sat Sep 11 19:29:00 GMT 2004
This is similar to, but not exactly like, bug 16782
$ cat junk.cc
void ::foo() { }
$ /usr/local/gcc-3.4.2/bin/g++ -c junk.cc -Wall
$ edgcpfe junk.cc
"junk.cc", line 1: error: the global scope has no "foo"
void ::foo() { }
^
1 error detected in the compilation of "junk.cc".
The Standard (ISO+IEC+14882-1998) says in 8.3 paragraph 1:
When the declarator-id is qualified,
the declaration shall refer to a previously declared member of the
class or namespace to which the qualifier refers, and the member
shall not have been introduced by a usingdeclaration in the scope
of the class or namespace nominated by the nested-name-specifier of
the declarator-id.
--
Summary: g++ accepts invalid qualified declarator-id
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ppluzhnikov at charter dot net
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17421
More information about the Gcc-bugs
mailing list