include <new>

More of a platform than compiler issue, but where do things like
<new> and <csdtdef> come from? I seem to be picking up from gcc-4.4.2 and failing:

#include <stdio.h>
#include <new>

In file included from /usr/include/c++/4.4.2/new:39:
/usr/include/c++/4.4.2/cstddef:42:10: fatal error: 'bits/c++config.h' file not
       found
#include <bits/c++config.h>

Thanks

That's the fault of the C++ header path hacks in
lib/Frontend/InitHeaderSearch.cpp; you probably need to add a missing
entry.

-Eli

Look identical to PR5902.

I try add missing PATH into InitHeaderSearch.cpp and hit more errs:

llvm$ cat tst.cpp
#include <iostream>

llvm$ clang++ -c tst.cpp
In file included from tst.cpp:1:
In file included from /usr/include/c++/4.3.2/iostream:44:
In file included from /usr/include/c++/4.3.2/ostream:44:
In file included from /usr/include/c++/4.3.2/ios:43:
In file included from /usr/include/c++/4.3.2/iosfwd:46:
In file included from /usr/include/c++/4.3.2/bits/postypes.h:46:
In file included from /usr/include/c++/4.3.2/cwchar:48:
/usr/include/c++/4.3.2/cstddef:47:15: fatal error: 'stddef.h' file not found
#include_next <stddef.h>
              ^
1 diagnostic generated.

reference: http://llvm.org/bugs/show_bug.cgi?id=5902#c8

Patch:
Index: InitHeaderSearch.cpp

applied in r93948, thanks

thanks.

But now i have next err.message (Fedora 10 / x86_64)

llvm$ clang++ -c tst.cpp
In file included from tst.cpp:1:
In file included from /usr/include/c++/4.3.2/iostream:44:
In file included from /usr/include/c++/4.3.2/ostream:44:
In file included from /usr/include/c++/4.3.2/ios:43:
In file included from /usr/include/c++/4.3.2/iosfwd:46:
In file included from /usr/include/c++/4.3.2/bits/postypes.h:46:
In file included from /usr/include/c++/4.3.2/cwchar:48:
/usr/include/c++/4.3.2/cstddef:47:15: fatal error: 'stddef.h' file not found
#include_next <stddef.h>
              ^
1 diagnostic generated.

llvm$ cat tst.cpp
#include <iostream>

Need i file PR ? Or i miss something trivial with configure/run clang++ ?

If i add -I/usr/include/linux, then more errs happens

clang++ -I/usr/include/linux -c tst.cpp
In file included from tst.cpp:1:
In file included from /usr/include/c++/4.3.2/iostream:44:
In file included from /usr/include/c++/4.3.2/ostream:44:
In file included from /usr/include/c++/4.3.2/ios:43:
In file included from /usr/include/c++/4.3.2/iosfwd:46:
In file included from /usr/include/c++/4.3.2/bits/postypes.h:46:
In file included from /usr/include/c++/4.3.2/cwchar:48:
/usr/include/c++/4.3.2/cstddef:47:15: fatal error: 'stddef.h' file not found
#include_next <stddef.h>
              ^
clang: DeclBase.cpp:420: void clang::Decl::CheckAccessDeclContext()
const: Assertion `Access != AS_none && "Access specifier is AS_none
inside a record decl"' failed.
[...]

Dmitry

But now i have next err.message (Fedora 10 / x86_64)

llvm$ clang++ -c tst.cpp
In file included from tst.cpp:1:
In file included from /usr/include/c++/4.3.2/iostream:44:
In file included from /usr/include/c++/4.3.2/ostream:44:
In file included from /usr/include/c++/4.3.2/ios:43:
In file included from /usr/include/c++/4.3.2/iosfwd:46:
In file included from /usr/include/c++/4.3.2/bits/postypes.h:46:
In file included from /usr/include/c++/4.3.2/cwchar:48:
/usr/include/c++/4.3.2/cstddef:47:15: fatal error: 'stddef.h' file not found
#include_next <stddef.h>
             ^
1 diagnostic generated.

llvm$ cat tst.cpp
#include <iostream>

This is a know bug: http://llvm.org/bugs/show_bug.cgi?id=5188
(btw, gcc 4.4 and newer versions don't do this #include and so the bug is not triggered)

Nuno