https://bugs.llvm.org/show_bug.cgi?id=42845
Bug ID: 42845
Summary: Clang 8 allows C++11-style enums in C
Product: clang
Version: 8.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C
Assignee: unassignedclangb...@nondot.org
Reporter: mark.l.barb...@gmail.com
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk
I wrote the following test code:
```
#include <stdint.h>
enum MyEnum : uint8_t {
A = 3,
B = 10,
C = 17,
};
```
This uses C++11 features, but Clang 8 compiles it fine as C code.
Both GCC and Clang 7 reject it with a parse error.
Here is a Compiler Explorer link: https://godbolt.org/z/99K4ck
--
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