================
@@ -6,27 +6,20 @@
 
 #include <stdarg.h>
 
-#define DERP this is an error
-
 void func(...) { // expected-warning {{'...' as the only parameter of a 
function is incompatible with C standards before C23}}
   // Show that va_start doesn't require the second argument in C23 mode.
   va_list list;
-  va_start(list); // expected-warning {{passing no argument for the '...' 
parameter of a variadic macro is incompatible with C standards before C23}} 
expected-note@* {{macro 'va_start' defined here}}
-  va_end(list);
-
-  // Show that va_start doesn't expand or evaluate the second argument.
-  va_start(list, DERP);
+  va_start(list);
----------------
AaronBallman wrote:
> I haven't found the `*-compat` warnings ever actually helpful (if you want to 
> check compat with previous versions, just build with the previous version!), 
> but, given that they do exist, should a new diagnostic be emitted under 
> `-Wpre-c23-compat` when __builtin_c23_va_start is called with 1-arg?

Yeah, it probably should given that `va_start(list)` won't compile under 
previous language modes.

https://github.com/llvm/llvm-project/pull/131166
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to