Bug 66892 (cwg355) - [12/13/14/15 Regression] [DR355] Fix of core language defect 355 has status c++11 but is not implemented yet
Summary: [12/13/14/15 Regression] [DR355] Fix of core language defect 355 has status c...
Status: NEW
Alias: cwg355
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 11.1.0
: P2 normal
Target Milestone: 12.5
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
: 95610 (view as bug list)
Depends on:
Blocks: c++-core-issues
  Show dependency treegraph
 
Reported: 2015-07-16 03:09 UTC by Anders Granlund
Modified: 2024-07-19 12:58 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work: 3.3.3
Known to fail: 3.4.0
Last reconfirmed: 2015-07-16 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Granlund 2015-07-16 03:09:58 UTC
The following core language defect has status c++11 but is not implemented yet:

http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#355

Without implementing this fix gcc doesn't fully support c++11 syntax.
Comment 1 Jonathan Wakely 2015-07-16 11:23:00 UTC
The DR says GCC didn't warn back in 2002, but this has been rejected since at least 4.3.6 so we must have changed it, in the wrong direction.
Comment 2 Andrew Pinski 2021-12-07 04:57:54 UTC
testcase:

struct A;
struct ::A { };
namespace B {
  struct A;
}
struct ::B::A { };

Looks the error message was added with the new parser in GCC 3.4.0.

The fix might be easy but I have not tested it to see if there is any regressions.
That is remove the following code from parser.c:
  /* Issue the error about the overly-qualified name now.  */
  if (qualified_p)
    {
      cp_parser_error (parser,
                       "global qualification of class name is invalid");
      type = error_mark_node;
      goto out;
    }
  else
Comment 3 Andrew Pinski 2021-12-07 04:58:57 UTC
*** Bug 95610 has been marked as a duplicate of this bug. ***
Comment 4 Andrew Pinski 2021-12-07 05:01:20 UTC
Since the defect report says it work in GCC at the time I am going to assume this actually did and it was introduced by the new parser so this is a regression.
Comment 5 Richard Biener 2022-05-27 09:35:45 UTC
GCC 9 branch is being closed
Comment 6 Jakub Jelinek 2022-06-28 10:31:36 UTC
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
Comment 7 Richard Biener 2023-07-07 10:30:51 UTC
GCC 10 branch is being closed.
Comment 8 Richard Biener 2024-07-19 12:58:12 UTC
GCC 11 branch is being closed.