[llvm-bugs] [Bug 52403] New: Compile fails when using enum declaration
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Nov 4 08:14:19 PDT 2021
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: unassignedclangbugs at nondot.org
Reporter: n.makhsudyan at yahoo.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211104/d01845b3/attachment.html>
More information about the llvm-bugs
mailing list