-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"diverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issue
Description
#include <stdarg.h>
//#define va_arg(v, l) __builtin_va_arg(v, l)
void test(const va_list *a)
{
va_arg(*a, unsigned long);
}
LLVM failed, as shown
https://godbolt.org/z/GTo7zfabM
<source>:6:3: error: read-only variable is not assignable
6 | va_arg(*a, unsigned long);
| ^ ~~
/opt/compiler-explorer/clang-trunk-20241008/lib/clang/20/include/__stdarg_va_arg.h:20:26: note: expanded from macro 'va_arg'
20 | #define va_arg(ap, type) __builtin_va_arg(ap, type)
| ^ ~~
1 error generated.
Compiler returned: 1GCC pass,
https://godbolt.org/z/Mr5WE5jf7
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"diverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issue