warn against K&R compiler in glibc 2.2

Andreas Jaeger aj@suse.de
Thu Mar 30 21:38:00 GMT 2000


>>>>> Ulrich Drepper writes:

Ulrich> Andreas Jaeger <aj@suse.de> writes:
>> The easiest way is AFAIK to add the following to some file:
>> #ifndef __STDC__
>> # error "You need a ISO C conforming compiler to use the glibc headers"
>> #endif

Ulrich> If we are thinking about other compilers but gcc (which is legitimate
Ulrich> for the use of glibc) then this is not enough.  Most compilers beside
Ulrich> gcc do not define __STDC__ except if you direct the compiler to be
Ulrich> strictly compliant.  This is a weakness in the ISO C standard.
:-(

Ulrich> I don't know whether we can add any reasonable check.

We can at least check for gcc -traditional with:
#if defined __GNUC__ && __STDC__
# error "You need a ISO C conforming compiler to use the glibc headers"
#endif

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de


More information about the Libc-hacker mailing list