public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/44400] New: GCC allows declaring a function having the name of the class using a typedef
@ 2010-06-03 14:53 schaub-johannes at web dot de
0 siblings, 0 replies; only message in thread
From: schaub-johannes at web dot de @ 2010-06-03 14:53 UTC (permalink / raw)
To: gcc-bugs
This code is accepted by GCC and compiles
typedef void F();
struct X { F X; };
Not valid according to 9.2/13bullet2. It seems that GCC thinks that "F X;" is a
data-member (declaring data-members with the name of the class is valid, as
long as there are no user declared constructors).
--
Summary: GCC allows declaring a function having the name of the
class using a typedef
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schaub-johannes at web dot de
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44400
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-06-03 14:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-03 14:53 [Bug c++/44400] New: GCC allows declaring a function having the name of the class using a typedef schaub-johannes at web dot de
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).