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]
Other format: [Raw text]

New cpp0 warning in 3.1 breaks configure (autoconf)


When running a configure script lots of small test compiles are done.
For a AC_CHECK_HEADER(string.h,[],[]) test a test 'preprocessing' is done.
Looking at config.log one can see the following

configure:6695: checking for string.h
configure:6705: gcc -E  -I/usr/include conftest.c >/dev/null 2>conftest.out
cpp0: warning: changing search order for system directory "/usr/include"
cpp0: warning:   as it has already been specified as a non-system directory
configure: failed program was:
#line 6700 "configure"
#include "confdefs.h"
#include <string.h>

Which now fails with GCC 3.1 because of the warnings emitted from cpp0.
What cpp0 takes offense against is obviously '-I/usr/include' if
that is removed everything works fine.   
I'd say that it's not entierly uncommon that configure.in's are written
so that a stray -I flag isn't added now and then.
It might also be need in case the user has the same headers (from
different versions or something) installed, on in /usr/include and on
in /usr/local/include and is trying to make configure pickup the one
in /usr/include.

Where can the forbidden directories be found?  
(Guessing based on gcc -v -E ..., /usr/local/include /usr/include)

Is there anyway to get rid of this warning?   Why is it on by default?

-- 
Håkan Hjort


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