gcc: Standard Libraries

1 
1 13.5 Standard Libraries
1 =======================
1 
1 GCC by itself attempts to be a conforming freestanding implementation.
1 ⇒Language Standards Supported by GCC Standards, for details of
1 what this means.  Beyond the library facilities required of such an
1 implementation, the rest of the C library is supplied by the vendor of
1 the operating system.  If that C library doesn't conform to the C
1 standards, then your programs might get warnings (especially when using
1 '-Wall') that you don't expect.
1 
1  For example, the 'sprintf' function on SunOS 4.1.3 returns 'char *'
1 while the C standard says that 'sprintf' returns an 'int'.  The
1 'fixincludes' program could make the prototype for this function match
1 the Standard, but that would be wrong, since the function will still
1 return 'char *'.
1 
1  If you need a Standard compliant library, then you need to find one, as
1 GCC does not provide one.  The GNU C library (called 'glibc') provides
1 ISO C, POSIX, BSD, SystemV and X/Open compatibility for GNU/Linux and
1 HURD-based GNU systems; no recent version of it supports other systems,
1 though some very old versions did.  Version 2.2 of the GNU C library
1 includes nearly complete C99 support.  You could also ask your operating
1 system vendor if newer libraries are available.
1