This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 15 Mar 2013 13:36:11 +0000
- Subject: [Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
- Auto-submitted: auto-generated
- References: <bug-11764-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764
--- Comment #25 from Jason Merrill <jason at gcc dot gnu.org> 2013-03-15 13:36:11 UTC ---
(In reply to comment #24)
> OK, I read some explanations in the duplicates but still don't know why this
> should be valid code.
That is a question for the standards committee.
> IMO it makes no sense to write A:A:A:B and given the facts that
> 1) people don't write this intentionally
> 2) people expect this to be invalid (see number of duplicates)
And the cases that are invalid were fixed by my patch.
> 3) some other compiler don't compile this
Which? Recent versions of EDG and clang both accept the testcase in comment
22.
> couldn't you at least give us a warning (e. g. with -pedantic)?
-pedantic means "strictly enforce the standard"; since the standard says that
the testcase in comment 22 is well-formed, -pedantic should not complain about
it. Someone could add another warning flag to warn about this, but it isn't a
priority for me.