https://bugs.llvm.org/show_bug.cgi?id=37122
Bug ID: 37122
Summary: Lvalue reference types appear in the signature of
__builtin_va_start when compiled as C and targeting
Windows
Product: clang
Version: 6.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
It seems that the signature of __builtin_va_start contains a C++ lvalue
reference type when targeting Windows, even when compiling as C:
$ cat t.c
void f(int n, ...) {
__builtin_va_list v;
__builtin_va_start(v, n);
}
$ clang --version
clang version 6.0.0 (tags/RELEASE_600/final)
Target: x86_64-unknown-linux-gnu
...
$ clang -c -Xclang -ast-dump -target x86_64-pc-windows-gnu t.c
...
`-FunctionDecl 0x4c89578 <col:3> col:3 implicit used __builtin_va_start 'void
(__builtin_va_list &, ...)' extern
|-ParmVarDecl 0x4c89618 <<invalid sloc>> <invalid sloc> '__builtin_va_list &'
`-NoThrowAttr 0x4c89680 <col:3> Implicit
Note the presence of '__builtin_va_list &' as a parameter type.
The lvalue reference is a surprise for AST consumers that do not expect to
encounter C++ reference types in code compiled as C.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs