https://bugs.llvm.org/show_bug.cgi?id=48002

            Bug ID: 48002
           Summary: Struct declarated by elaborated type specifier inside
                    another struct.
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: anders.granlun...@gmail.com
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@metafoo.co.uk

Consider the following c++ program:

  int main()
  {
      struct A
      {
        struct B *b;
      };

      using U = B;   
  }

Compile it with "-std=c++20 -pedantic-errors".

Clang rejects it with the following error 
message: "unknown type name 'B': using U = B;".

Note that the gcc compiler correctly accepts it.

I tried to report this as a gcc bug before, but it turned out that the gcc
behaviour is correct ( see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97569
).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to