This is the mail archive of the gcc-patches@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]

Re: [LIBIBERTY PATCH]: fix getopt.c compile failure with cc


"Kaveh R. Ghazi" <ghazi@caipclassic.rutgers.edu> writes:

>  > You might want to look into why ansidecl.h is tampering with const.
>  > That should only happen if ansidecl.h thinks that the compiler is not
>  > C90-compliant.  We currently require a C90 compliant compiler in any
>  > case; why does ansidecl.h think the compiler is not C90 compliant?
> 
> It's actually backwards.  Solaris2 cc *is* ansi compliant, but it
> defines __STDC__ to 0.  There's this code at the top of getopt.c:
> 
> 	#if !defined __STDC__ || !__STDC__
> 	/* This is a separate conditional since some stdc systems
> 	   reject `defined (const)'.  */
> 	# ifndef const
> 	#  define const
> 	# endif
> 	#endif

Oh, I see.  Thanks for the explanation.

I think we can probably get rid of that bit of getopt.c, not that it
really matters.

Ian


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