[llvm-bugs] [Bug 37122] New: Lvalue reference types appear in the signature of __builtin_va_start when compiled as C and targeting Windows
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Apr 13 08:32:51 PDT 2018
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: unassignedclangbugs at nondot.org
Reporter: thonerma at synopsys.com
CC: llvm-bugs at lists.llvm.org
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180413/ae9c0a26/attachment.html>
More information about the llvm-bugs
mailing list