[LLVMbugs] [Bug 7614] New: undefined reference when using VLA
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jul 9 12:44:06 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7614
Summary: undefined reference when using VLA
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: grzegorz.dabrowski at gmail.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
$ uname -a
Linux kaliber 2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 07:54:58 UTC 2010
i686 GNU/Linux
$ clang -v
clang version 2.8 (trunk 107677)
Target: i386-pc-linux-gnu
Thread model: posix
$ cat vla.cpp
#include <algorithm>
int main() {
int buffer[std::max(1, 2)];
return 0;
}
$ clang vla.cpp
/tmp/cc-nhweyo.o: In function `main':
vla.cpp:(.text+0x31): undefined reference to `int const& std::max<int>(int
const&, int const&)'
collect2: ld returned 1 exit status
clang: error: linker (via gcc) command failed with exit code 1 (use -v to see
invocation)
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list