This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: -I/usr/include


On Fri, 30 Mar 2001, Nathan Sidwell wrote:

> I've just had to debug some C++ code that wasn't building. The culprit
> turned out to be that g++ was being invoked as
> 	g++ -I/usr/include ....
> This breaks badly.
> 
> Would it be a good idea to catch this kind of stupidity earlier on, rather
> than later having to wonder why
> 	/usr/include/stddef.h:50: redeclaration of C++ built-in type `wchar_t'
> is happening (amongst a pile of other stuff)?

It's already documented in gcc.texi that you shouldn't do that, but the
documentation tries to tell you how to do it anyway (and is very out of
date, referencing /usr/local/lib/g++-include).  So, at least change the
documentation to say "don't do that", without trying to tell people
exactly what directories to include manually.  (The include search paths
should be documented, but not there; if someone wants to handle the
include path manually they should be using -nostdinc -isystem and know
what they're doing.)

-- 
Joseph S. Myers
jsm28@cam.ac.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]