[Bug c++/16846] New: elaborated type specifier issue
forester at hacker dot lv
gcc-bugzilla@gcc.gnu.org
Sun Aug 1 02:03:00 GMT 2004
class a;
class b {
::a a();
};
class a;
class b {
class a a();
};
first variant gives error:
"error: declaration of `a b::a()'
error: changes meaning of `a' from `struct a'"
ANSI C++ (1995 draft):
"[basic.scope.elab] 3.3.8 Elaborated type specifier
A class name or enumeration name can be hidden by the name of an object,
function, or enumerator in
local, class or namespace scope. A hidden class name can still be used when
appropriately prefixed with
class, struct, or union (7.1.5), or when followed by the :: operator. A hidden
enumeration name
can still be used when appropriately prefixed with enum (7.1.5)."
do i correctly understand that first variant with :: ("when followed by the ::
operator") must work?
--
Summary: elaborated type specifier issue
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: forester at hacker dot lv
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16846
More information about the Gcc-bugs
mailing list