GCC and C89 Standard <stdlib.h> vs <locale.h>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Supposedly, one can specify that gcc use the C89 Standard
when compiling. I see, however, that LC_COLLATE is in
<locale.h>, which I guess must be the place it is in for
C99. I used gcc -std=c89 and still had to use <locale.h>
so it seems that the C89 support is incomplete. I have
searched the entire /usr/include directory tree for
LC_COLLATE, and this seems to be by design. Is it?
Or is it an oversight? The man page states

 -std=
           Determine the language standard.  This option is currently only
           supported when compiling C or C++.  A value for this option must
           be provided; possible values are

           c89
           iso9899:1990
               ISO C90 (same as -ansi).

This seems to me to mean that the language compiled should be as
specified in the C89 Standard. Yet the language actually accepted
by the compiler seems to be a composite of C89 and C99 when
-std=c89 is specified, since <stdlib.h> does not have a definition
of LC_COLLATE when -std=c89 is specified.

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux