gcc 2.95.2, Tru64 4.0f: va_list declared twice by gcc headers

Jonathan Lennox lennox@cs.columbia.edu
Wed Apr 5 19:48:00 GMT 2000


When I compile the program 'va-test.c' below on a Tru64 (OSF/1) 4.0f
system, I get the error messages that follow:

In file included from /usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdarg.h:36,
                 from va-test.c:2:
/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/va-alpha.h:36:
warning: redefinition of `va_list'
/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/va_list.h:7:
warning: `va_list' previously declared here

If the order in which <stdio.h> and <stdarg.h> are included is switched, the
error message goes away.

Both of the files which generate the error messages seem to be include files
distributed with gcc, not ones created by fixincludes.

Is there a patch for this?

Here's the full compile output:
backbay $ gcc -v --save-temps va-test.c
Reading specs from /usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/specs
gcc version 2.95.2 19991024 (release)
 /usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/cpp -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -Dunix -D__osf__ -D_LONGLONG -DSYSTYPE_BSD -D_SYSTYPE_BSD -D__unix__ -D__osf__ -D_LONGLONG -D__SYSTYPE_BSD__ -D_SYSTYPE_BSD -D__unix -D__SYSTYPE_BSD -Asyst
em(unix) -Asystem(xpg4) -D__LANGUAGE_C__ -D__LANGUAGE_C -DLANGUAGE_C -Acpu(alpha) -Amachine(alpha) -D__alpha -D__alpha__ -D__alpha_ev6__ -Acpu(ev6) -D__alpha_bwx__ -Acpu(bwx) -D__alpha_max__ -Acpu(max) -D__alpha_fix__ -Acpu(fix) va-test.c va-test.i
GNU CPP version 2.95.2 19991024 (release)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/../../../../alphaev6-dec-osf4.0f/include
 /usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
 /usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/../../../../include/g++-3
End of omitted list.
 /usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/cc1 va-test.i -quiet -dumpbase va-test.c -version -o va-test.s
GNU C version 2.95.2 19991024 (release) (alphaev6-dec-osf4.0f) compiled by GNU C version 2.95.2 19991024 (release).
In file included from /usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdarg.h:36,
                 from va-test.c:2:
/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/va-alpha.h:36: warning: redefinition of `va_list'
/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/va_list.h:7: warning: `va_list' previously declared here
 as -g -nocpp -O0 -o va-test.o va-test.s
 /usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/mips-tfile -v -I va-test.o~ -o va-test.o va-test.s
mips-tfile version 2.95.2 19991024 (release)
 /usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/collect2 -G 8 -O1 -call_shared /usr/lib/cmplrs/cc/crt0.o -L/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2 -L/usr/lib/cmplrs/cc -L/usr/local/lib va-test.o -lgcc -lc -lgcc

-- 
Jonathan Lennox
lennox@cs.columbia.edu


More information about the Gcc-bugs mailing list