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

            Bug ID: 52403
           Summary: Compile fails when using enum declaration
           Product: clang
           Version: 13.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++2a
          Assignee: unassignedclangb...@nondot.org
          Reporter: n.makhsud...@yahoo.com
                CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
                    llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk

According to C++20 standard the following code is valid, however it doesn't
compile with clang13:

enum class Pig { Oink };
using Hog = Pig;
using enum Hog;


Output:

<source>:3:12: error: type alias 'Hog' cannot be referenced with a enum
specifier
using enum Hog;
           ^
<source>:2:7: note: declared here
using Hog = Pig;
      ^
1 error generated.
Compiler returned: 1


Obligatory godbolt link:
https://gcc.godbolt.org/z/413defY1q

-- 
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