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]

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


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
#include <stdio.h>
#include <stdarg.h>

int main(int c, char *argv[])
{
  printf("Hello, world!\n");
  exit(0);
}
# 1 "va-test.c"
# 1 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdio.h" 1 3

# 1 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdarg.h" 1 3
 


































# 1 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/va-alpha.h" 1 3
 

 




 




 





typedef struct {
  char *__base;			 
  int __offset;			 
} __gnuc_va_list;




 


# 128 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/va-alpha.h" 3

# 36 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdarg.h" 2 3

# 133 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdarg.h" 3









# 209 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdarg.h" 3




# 2 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdio.h" 2 3

 





















 


 

 
 



 


 









                                                                   




# 1 "/usr/include/standards.h" 1 3
 





















 


 

 
 



 


 













 












                                                                   



 
















 



 





 




 








 




 







 







 
















 







 









 






 


 

 











 
















 
 















# 237 "/usr/include/standards.h" 3


 












 
 






 
 









 
 






# 289 "/usr/include/standards.h" 3



# 53 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdio.h" 2 3


 










 










typedef unsigned long   size_t;




typedef long    fpos_t;


 








 










 













# 1 "/usr/include/sys/seek.h" 1 3
 





















 


 


 



 






 











# 119 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdio.h" 2 3


typedef struct {
	int	_cnt;
	unsigned int	_flag2;
	unsigned char	*_ptr;
	unsigned char	*_base;
	int	_bufsiz;
	short	_flag;
	short	_file;




	char	*__newbase;
	void	*_lock;			 
	unsigned char	*_bufendp;
} FILE;

extern FILE	_iob[];












 
extern size_t	fread  (void *, size_t, size_t, FILE *)  ;
extern size_t	fwrite  (const void *, size_t, size_t, FILE *)  ;
 


 
extern int	_flsbuf  (int, FILE *)  ;
extern int	_filbuf  (FILE *)  ;
extern int 	ferror  (FILE *)  ;
extern int 	feof  (FILE *)  ;
extern void 	clearerr  (FILE *)  ;
extern int 	putchar  (int)  ;
extern int 	getchar  (void)  ;
extern int 	putc  (int, FILE *)  ;
extern int 	getc  (FILE *)  ;
extern int	remove  (const char *)  ;
extern int	rename  (const char *, const char *)  ;
extern FILE 	*tmpfile  (void)  ;
extern char 	*tmpnam  (char *)  ;
extern int 	fclose  (FILE *)  ;
extern int 	fflush  (FILE *)  ;
extern FILE	*fopen  (const char *, const char *)  ;
extern FILE 	*freopen  (const char *, const char *, FILE *)  ;
extern void 	setbuf  (FILE *, char *)  ;
extern int 	setvbuf  (FILE *, char *, int, size_t)  ;
extern int	fprintf  (FILE *, const char *, ...)  ;
extern int	fscanf  (FILE *, const char *, ...)  ;
extern int	printf  (const char *, ...)  ;
extern int	scanf  (const char *, ...)  ;
extern int	sprintf  (char *, const char *, ...)  ;
extern int	sscanf  (const char *, const char *, ...)  ;








# 1 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/va_list.h" 1 3
 

# 1 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/va-alpha.h" 1 3
 

 




 

# 25 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/va-alpha.h" 3


 


# 128 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/va-alpha.h" 3

# 3 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/va_list.h" 2 3




typedef __gnuc_va_list va_list;









# 191 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdio.h" 2 3

extern int  vfprintf  (FILE *, const char *, __gnuc_va_list)  ;
extern int  vprintf  (const char *, __gnuc_va_list)  ;
extern int  vsprintf  (char *, const char *, __gnuc_va_list)  ;
# 203 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdio.h" 3



extern int 	fgetc  (FILE *)  ;
extern char 	*fgets  (char *, int, FILE *)  ;
extern int 	fputc  (int, FILE *)  ;
extern int 	fputs  (const char *, FILE *)  ;
extern char 	*gets  (char *)  ;
extern int 	puts  (const char *)  ;
extern int	ungetc  (int, FILE *)  ;
extern int	fgetpos  (FILE *, fpos_t *)  ;
extern int 	fseek  (FILE *, long, int)  ;
extern int	fsetpos  (FILE *, const fpos_t *)  ;
extern long	ftell  (FILE *)  ;
extern void	rewind  (FILE *)  ;
extern void 	perror  (const char *)  ;










 













 

# 284 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdio.h" 3


# 337 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdio.h" 3















 









# 1 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/sys/types.h" 1 3
 





















 


 

 
 

 



 


 














 













 














 








typedef long int ptrdiff_t;









# 115 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/sys/types.h" 3





    typedef unsigned int wchar_t;







typedef unsigned int wctype_t;









typedef int            time_t;




typedef int             clock_t;


# 155 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/sys/types.h" 3








typedef long                    ssize_t;  


 


typedef	unsigned char	uchar_t;
typedef	unsigned short	ushort_t;
typedef	unsigned int	uint_t;
typedef unsigned long	ulong_t;
typedef	volatile unsigned char	vuchar_t;
typedef	volatile unsigned short	vushort_t;
typedef	volatile unsigned int	vuint_t;
typedef volatile unsigned long	vulong_t;




typedef	struct	{ long r[1]; } *physadr_t;
 



typedef	struct	label_t	{
	long	val[10];
} label_t;


# 200 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/sys/types.h" 3
































typedef int		level_t;
typedef	int		daddr_t;	 
typedef	char *		caddr_t;	 
typedef long *		qaddr_t;         
typedef char *          addr_t;
typedef	uint_t		ino_t;		 
typedef short		cnt_t;
typedef int		dev_t;		 
typedef	int		chan_t;		 

# 303 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/sys/types.h" 3





typedef long    off_t;			 


typedef unsigned long	rlim_t;		 
typedef	int		paddr_t;
typedef	ushort_t	nlink_t;



typedef int    		key_t;		 




typedef	uint_t		mode_t;		 







typedef uint_t		uid_t;		 





typedef uint_t		gid_t;		 




typedef	void *		mid_t;		 




typedef	int		pid_t;		 


typedef char		slab_t[12];	 

typedef ulong_t		shmatt_t;	 
typedef ulong_t		msgqnum_t;	 
typedef ulong_t		msglen_t;	 



        typedef unsigned int wint_t;          


 


typedef unsigned long	sigset_t;


 












typedef struct __pthread_attr_t {
    long		__valid  ;
    char*		__name  ;
    unsigned long	__arg  ;
    unsigned long	__reserved  [19];
    } pthread_attr_t;

typedef struct __pthread_mutexattr_t {
    long		__valid  ;
    unsigned long	__reserved  [15];
    } pthread_mutexattr_t;

typedef struct __pthread_condattr_t {
    long		__valid  ;
    unsigned long	__reserved  [13];
    } pthread_condattr_t;

typedef struct __pthread_rwlockattr_t {
    long		__valid  ;
    unsigned long	__reserved  [15];
    } pthread_rwlockattr_t;















 













typedef struct __pthread_t {
    void*		__reserved1  ;	 
    void*		__reserved2  ;	 
    unsigned short	__size  ;	  	 
    unsigned char	__version  ;	 
    unsigned char	__reserved3  ;	 
    unsigned char	__external  ;	 
    unsigned char	__reserved4  [2];	 
    unsigned char	__creator  ;	 
    unsigned long	__sequence  ;	 
    unsigned long	__reserved5  [2];	 
    void*		__per_kt_area  ;	 
    void*		__stack_base  ;	 
    void*		__stack_reserve  ;	 
    void*		__stack_yellow  ;	 
    void*		__stack_guard  ;	 
    unsigned long	__stack_size  ;	 
    void**		__tsd_values  ;	 
    unsigned long	__tsd_count  ;	 
    unsigned int	__reserved6  ;	 
    unsigned int	__reserved7  ;	 
    unsigned int	__thread_flags  ;	 
    int			__thd_errno  ;	 
    void*		__stack_hiwater  ;  
    } *pthread_t, pthreadTeb_t;

typedef struct __pthread_mutex_t {
    unsigned int	__lock  ;
    unsigned int	__valid  ;
    char*		__name  ;
    unsigned int	__arg  ;
    unsigned int	__depth  ;
    unsigned long	__sequence  ;
    unsigned long	__owner  ;
    void*		__block  ;
    } pthread_mutex_t;

typedef struct __pthread_cond_t {
    unsigned int	__state  ;
    unsigned int	__valid  ;
    char*		__name  ;
    unsigned int	__arg  ;
    unsigned int	__reserved1  ;
    unsigned long	__sequence  ;
    void*		__block  ;
    } pthread_cond_t;

typedef struct __pthread_rwlock_t {
    unsigned int	__valid  ;
    unsigned int	__flags  ;
    char*		__name  ;
    unsigned int	__arg  ;
    unsigned int	__readers  ;
    unsigned int	__rwaits  ;
    unsigned int	__wwaits  ;
    unsigned long	__sequence  ;
    unsigned long	__wrid  ;
    void*		__block  ;
    unsigned long	__reserved1  ;
    } pthread_rwlock_t;

typedef unsigned int	pthread_key_t;

typedef struct __pthread_once_t {
    long	__state  ;
    long	__reserved  [10];
    } pthread_once_t;




 




typedef long            timer_t;         



















typedef void (*sig_t)  (int,void (*)(int))  ;





 






typedef pid_t		id_t;		 
					 
					 
					 
					 
typedef unsigned int	useconds_t;	 





 


typedef uint_t	major_t;       
typedef uint_t	minor_t;       
typedef uint_t	devs_t;        
typedef uint_t	unit_t;        

 






 










# 1 "/usr/include/mach/machine/vm_types.h" 1 3
 





















 


 

 
 





















 



 



 






 






typedef	unsigned long	vm_offset_t;
typedef	unsigned long	vm_size_t;



# 575 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/sys/types.h" 2 3


 


typedef	uchar_t		uchar;
typedef	ushort_t	ushort;
typedef	uint_t		uint;
typedef ulong_t		ulong;

typedef	physadr_t	physadr;


 
typedef	uchar_t		u_char;
typedef	ushort_t 	u_short;
typedef	uint_t		u_int;
typedef	ulong_t		u_long;
typedef	vuchar_t	vu_char;
typedef	vushort_t 	vu_short;
typedef	vuint_t		vu_int;
typedef	vulong_t	vu_long;





typedef struct  _quad { int val[2]; } quad;


typedef	long	swblk_t;
typedef u_long	fixpt_t;

# 1 "/usr/include/sys/select.h" 1 3
 





















 


 

 
 

 



 




 











# 118 "/usr/include/sys/select.h" 3




 








# 144 "/usr/include/sys/select.h" 3


typedef int	fd_mask;



 



















typedef	struct fd_set {
	fd_mask	fds_bits[(((  4096     )+((    (sizeof(fd_mask) * 8 )    )-1))/(    (sizeof(fd_mask) * 8 )    ))  ];
} fd_set;





# 202 "/usr/include/sys/select.h" 3











 









extern void bzero  (char *, int)  ;






struct timeval;
int select  (int, fd_set *, fd_set *, fd_set *, struct timeval *)  ;








# 608 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/sys/types.h" 2 3




 
typedef unsigned char sa_family_t;

 
typedef	unsigned int	in_addr_t;
 
typedef	unsigned short	in_port_t;






# 362 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdio.h" 2 3





 
extern int 	fileno  (FILE *)  ;
extern FILE 	*fdopen  (int, const char *)  ;




extern char *cuserid  (char *)  ;
 













 
# 1 "/usr/include/getopt.h" 1 3
 





















 


 


 


 
 












extern int getopt  (int, char * const [], const char *)  ;




extern char *optarg;
extern int optind;
extern int optopt;
extern int opterr;


# 390 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdio.h" 2 3

 



 
extern char	*ctermid  (char *)  ;
extern int 	getw  (FILE *)  ;
extern int 	pclose  (FILE *)  ;
extern int 	putw  (int, FILE*)  ;
extern FILE 	*popen  (const char *, const char *)  ;
extern char 	*tempnam  (const char*, const char*)  ;
 






# 1 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/sys/limits.h" 1 3
 





















 


 

 
 



 


 
















 









                                                                   





 










# 1 "/usr/include/machine/machlimits.h" 1 3
 





















 


 

 
 



 


 


 

































					 



					 







 



# 80 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/sys/limits.h" 2 3





 










 















 










 













 



# 1 "/usr/include/sys/syslimits.h" 1 3
 





















 


 

 
 

 



 


 











































# 141 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/sys/limits.h" 2 3








 

















 







					 
 





























































# 1 "/usr/include/machine/machtime.h" 1 3
 





















 


 

 
 





















 



 


 



 









# 238 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/sys/limits.h" 2 3












 




# 1 "/usr/include/sys/rt_limits.h" 1 3
 





















 


 


 















































# 255 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/sys/limits.h" 2 3




 









 


# 409 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdio.h" 2 3


 









 


















 
extern void 	setbuffer  (FILE *, char*, int)  ;
extern void 	setlinebuf  (FILE *)  ;
 



# 488 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdio.h" 3





# 1 "va-test.c" 2

# 1 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdarg.h" 1 3
 


































# 1 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/va-alpha.h" 1 3
 

 




 

# 25 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/va-alpha.h" 3


 








typedef __gnuc_va_list va_list;

# 49 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/va-alpha.h" 3


 

 
















 

enum {
  __no_type_class = -1,
  __void_type_class,
  __integer_type_class,
  __char_type_class,
  __enumeral_type_class,
  __boolean_type_class,
  __pointer_type_class,
  __reference_type_class,
  __offset_type_class,
  __real_type_class,
  __complex_type_class,
  __function_type_class,
  __method_type_class,
  __record_type_class,
  __union_type_class,
  __array_type_class,
  __string_type_class,
  __set_type_class,
  __file_type_class,
  __lang_type_class
};

 


 




 





















 



# 36 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdarg.h" 2 3

# 133 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdarg.h" 3










 
 













# 175 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdarg.h" 3


 



# 205 "/usr/local/lib/gcc-lib/alphaev6-dec-osf4.0f/2.95.2/include/stdarg.h" 3








# 2 "va-test.c" 2


int main(int c, char *argv[])
{
  printf("Hello, world!\n");
  exit(0);
}

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