public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "schaub-johannes at web dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/44400] New: GCC allows declaring a function having the name of the class using a typedef Date: Thu, 03 Jun 2010 14:53:00 -0000 [thread overview] Message-ID: <bug-44400-16474@http.gcc.gnu.org/bugzilla/> (raw) 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
reply other threads:[~2010-06-03 14:53 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-44400-16474@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).