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]

conflict include file names found in gcc-3.4.1


Platform:

    > uname -r
    2.4.20-20.7.cisco.4smp

    > gcc -v
    Reading specs from
    /auto/insbu-cnstools/libx86/gcc-lib/i686-pc-linux-gnu/2.95.3/specs
    gcc version 2.95.3 20010315 (release)

Problem:

    Got error reporting that OPT_A, ... not defined when compiling
    c-opts.c.

Reason: 

    Another include file 'options.h' (provided by autogen) installed
    in a location before local options.h is found.

Recommendation:

    (1) fix the include path so that local directory will be scanned
	first, it has:

	gcc -c -g -DIN_GCC -W -Wall -Wwrite-strings
	    -Wstrict-prototypes -Wmissing-prototypes -pedantic
	    -Wno-long-long -DHAVE_CONFIG_H
	    -I/auto/insbu-cnstools/include -I. -I.
	    -I../../gcc-3.4.1/gcc -I../../gcc-3.4.1/gcc/.
	    -I../../gcc-3.4.1/gcc/../include 
	    ../../gcc-3.4.1/gcc/c-opts.c -o c-opts.o
	
	The /auto/insbu-cnstools/include inserted here might contains
	other include files with the same name.  It will be safer to
	put this at the end.

    (2) change the file name.  Although autogen is also at fault, to
        avoid this kind of name clash, rename options.h to something
        like gcc_options.h will likely prevent this from happening.


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