Issue 165107
Summary Compile error : enum with type specifier is invalid C - msvc compiler rejects it.
Labels new issue
Assignees
Reporter adv-sw
    Compiled trunk using MSVC 2022.

Fails on this : https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/builtins/cpu_model/x86.c#L39

Needs something like:

#if _MSC_VER
// Not supported for C code
#define UINT_ENUM
#else
#define UINT_ENUM  : unsigned int 
#endif


enum ProcessorVendors UINT_ENUM {

Similarly ProcessorTypes immediately below.


Might get away with it other compilers but apparently it's invalid.

 : unsigned int syntax is C++11+ only—it's invalid in C (any standard: C89/C99/C11/C17/C23).




_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to