]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/doc/gcc/known-causes-of-trouble-with-gcc/standard-libraries.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / doc / gcc / known-causes-of-trouble-with-gcc / standard-libraries.rst
CommitLineData
c63539ff
ML
1..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6.. index:: Wall
7
8.. _standard-libraries:
9
10Standard Libraries
11******************
12
13GCC by itself attempts to be a conforming freestanding implementation.
14See :ref:`standards`, for details of
15what this means. Beyond the library facilities required of such an
16implementation, the rest of the C library is supplied by the vendor of
17the operating system. If that C library doesn't conform to the C
18standards, then your programs might get warnings (especially when using
19:option:`-Wall`) that you don't expect.
20
21For example, the ``sprintf`` function on SunOS 4.1.3 returns
22``char *`` while the C standard says that ``sprintf`` returns an
23``int``. The ``fixincludes`` program could make the prototype for
24this function match the Standard, but that would be wrong, since the
25function will still return ``char *``.
26
27If you need a Standard compliant library, then you need to find one, as
28GCC does not provide one. The GNU C library (called ``glibc``)
29provides ISO C, POSIX, BSD, SystemV and X/Open compatibility for
30GNU/Linux and HURD-based GNU systems; no recent version of it supports
31other systems, though some very old versions did. Version 2.2 of the
32GNU C library includes nearly complete C99 support. You could also ask
3ed1b4ce 33your operating system vendor if newer libraries are available.