================
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 %s -fsyntax-only -Wmicrosoft -verify -fms-extensions
+
+typedef enum tag1 { } A; // expected-warning {{empty enumeration types are a 
Microsoft extension}}
+typedef enum tag2 { } B; // expected-warning {{empty enumeration types are a 
Microsoft extension}}
+typedef enum : unsigned { } C; // expected-warning {{enumeration types with a 
fixed underlying type are a Microsoft extension}}\
----------------
AaronBallman wrote:

I think emitting two diagnostics is fine (one for the underlying type and one 
for the empty enum) because they are separate extensions. But I think it's a 
bit odd that we claim the underlying type is a Microsoft extension rather than 
a C23 extension -- that seems to be a preexisting issue which could be handled 
in a separate PR: https://godbolt.org/z/sMhGoE3qq

https://github.com/llvm/llvm-project/pull/159981
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to