[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764 --- Comment #24 from André Wöbbeking Woebbeking at web dot de 2013-03-15 09:25:02 UTC --- OK, I read some explanations in the duplicates but still don't know why this should be valid code. 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) 3) some other compiler don't compile this couldn't you at least give us a warning (e. g. with -pedantic)?
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
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.
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764 --- Comment #26 from André Wöbbeking Woebbeking at web dot de 2013-03-15 13:45:50 UTC --- (In reply to comment #25) (In reply to comment #24) 3) some other compiler don't compile this Which? Recent versions of EDG and clang both accept the testcase in comment 22. MSVC 2010 In another duplicate ICC 6 was mentioned. 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, Yep, that is probably the better solution.
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764 --- Comment #27 from Jonathan Wakely redi at gcc dot gnu.org 2013-03-15 13:49:58 UTC --- (In reply to comment #26) Which? Recent versions of EDG and clang both accept the testcase in comment 22. MSVC 2010 Other compilers have bugs doesn't seem like a good reason to change GCC. In another duplicate ICC 6 was mentioned. That's ancient, isn't it?
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764 --- Comment #22 from André Wöbbeking Woebbeking at web dot de 2013-02-20 16:31:47 UTC --- Hi, shouldn't struct A { struct B {}; }; int main() { A::A::B b; } fail to compile? It compiles with 4.6 and 4.7. Cheers, André
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764 --- Comment #23 from Jonathan Wakely redi at gcc dot gnu.org 2013-02-20 17:03:00 UTC --- No, that's valid. In the nested-name-specifier the second A only considers namespaces, types and templates whose specializations are types ([basic.lookup.qual]) so it doesn't name the constructor.
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
--- Comment #21 from pinskia at gcc dot gnu dot org 2010-04-09 02:56 --- *** Bug 43649 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||in10semotions at googlemail ||dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
--- Comment #19 from jason at gcc dot gnu dot org 2009-11-24 20:55 --- Subject: Bug 11764 Author: jason Date: Tue Nov 24 20:55:24 2009 New Revision: 154519 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=154519 Log: PR c++/42137 * parser.c (cp_parser_mem_initializer_id): Pass typename_type to cp_parser_class_name. (cp_parser_unqualified_id): Same, rather than class_type. PR c++/11764 * parser.c (cp_parser_expression_statement): Give helpful error for constructor name used as type. Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/parser.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/lookup/name-clash4.C trunk/gcc/testsuite/g++.dg/tc1/dr147.C trunk/gcc/testsuite/g++.old-deja/g++.pt/ctor2.C -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
--- Comment #20 from jason at gcc dot gnu dot org 2009-11-24 21:05 --- Fixed. -- jason at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
-- jason at gcc dot gnu dot org changed: What|Removed |Added Target Milestone|--- |4.5.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
--- Comment #18 from jason at gcc dot gnu dot org 2009-11-23 22:57 --- Mine now. -- jason at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|gdr at gcc dot gnu dot org |jason at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
--- Comment #17 from paolo dot carlini at oracle dot com 2009-11-16 14:06 --- Gaby, I'm sorry, are you actively working on this issue? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
--- Comment #16 from pinskia at gcc dot gnu dot org 2009-11-16 06:21 --- *** Bug 42064 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||pi3orama at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
--- Comment #15 from Woebbeking at web dot de 2009-06-01 10:28 --- Ian, I know open source and I also know that some parts are more interesting than others :-) Most the time I'm a happy GCC user (sure, it could be faster but that's what compile farms are for). But this bug is assigned for nearly 6 years now that makes me a bit sad. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
--- Comment #13 from Woebbeking at web dot de 2009-05-30 08:46 --- If you're sure that it's a bug why isn't it fixed yet? Is it that hard that you need more than six years? Sure it's no show stopper but it's annoying. I'm using -pedantic and -ansi to ensure platform independent code and then this... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
--- Comment #14 from ian at airs dot com 2009-05-30 16:03 --- gcc is a free software project driven largely by volunteers. Interest in fixing accepts-invalid bugs is generally low; people are generally more interested in rejects-valid bugs, or in better optimizations, or in avoiding regressions. There are, unfortunately, many open bugs, many of which have higher priority than this one. If this bug is important to you, you do have the option of fixing it yourself. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
--- Comment #12 from pinskia at gcc dot gnu dot org 2009-05-29 15:15 --- *** Bug 40294 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||Woebbeking at web dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
--- Comment #11 from pinskia at gcc dot gnu dot org 2009-04-27 04:10 --- *** Bug 39924 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||marc dot glisse at ||normalesup dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
--- Comment #10 from pinskia at gcc dot gnu dot org 2008-06-11 23:44 --- *** Bug 36501 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||gp dot bolton at computer ||dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
--- Comment #9 from pinskia at gcc dot gnu dot org 2008-05-23 05:44 --- *** Bug 36306 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||dushistov at mail dot ru http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
--- Comment #8 from bangerth at dealii dot org 2007-10-04 18:46 --- *** Bug 33659 has been marked as a duplicate of this bug. *** -- bangerth at dealii dot org changed: What|Removed |Added CC||ian at airs dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764
[Bug c++/11764] [DR147] g++ does not treat injected class name correctly.
--- Comment #7 from fang at csl dot cornell dot edu 2007-05-08 20:44 --- Still accepts-invalid as of 4.2-20070430 (RC2). -- fang at csl dot cornell dot edu changed: What|Removed |Added CC||fang at csl dot cornell dot ||edu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11764