http://llvm.org/bugs/show_bug.cgi?id=21410
Bug ID: 21410
Summary: std option leads to error if _Bool and stdbool.h are
used in C++ source
Product: clang
Version: 3.4
Hardware: PC
OS: NetBSD
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Hi All,
First, to make the OS type clearer, I'm using NetBSD with minix (3.3.0) kernel.
I bumped into the problem when trying to include a C library's header which
happened to use the _Bool type in my C++ source. So I included the stdbool.h in
the C++ source. I managed to narrow down the source to this (call it test.cpp)
to reproduce the issue:
#include <stdbool.h>
int main(){
_Bool y;
return 0;
}
The scenarios to compile are as follows:
1) clang++ -o test test.cpp
compiles fine
2) clang++ -std=c++98 -o test test.cpp
error: unknown type name '_Bool'
3) clang++ -std=c++03 -o test test.cpp
error: unknown type name '_Bool'
4) clang++ -std=c++11 -o test test.cpp
error: unknown type name '_Bool'
5) not using stdbool.h does not help either as then even scenario 1) leads to
the same error
6) as the least important: specifying -ansi (i.e. '89 std) gives the same error
Actually, scenario 1) works fine but I'd like to use c++11 std. Thanks for your
help in advance!
Best regards,
r0ller
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs