.. Copyright 1988-2022 Free Software Foundation, Inc. This is part of the GCC manual. For copying conditions, see the copyright.rst file. .. index:: system header files .. _system-headers: System Headers ************** The header files declaring interfaces to the operating system and runtime libraries often cannot be written in strictly conforming C. Therefore, GCC gives code found in :dfn:`system headers` special treatment. All warnings, other than those generated by :samp:`#warning` (see :ref:`diagnostics`), are suppressed while GCC is processing a system header. Macros defined in a system header are immune to a few warnings wherever they are expanded. This immunity is granted on an ad-hoc basis, when we find that a warning generates lots of false positives because of code in macros defined in system headers. Normally, only the headers found in specific directories are considered system headers. These directories are determined when GCC is compiled. There are, however, two ways to make normal headers into system headers: * Header files found in directories added to the search path with the :option:`-isystem` and :option:`-idirafter` command-line options are treated as system headers for the purposes of diagnostics. * .. index:: #pragma GCC system_header There is also a directive, ``#pragma GCC system_header``, which tells GCC to consider the rest of the current include file a system header, no matter where it was found. Code that comes before the :samp:`#pragma` in the file is not affected. ``#pragma GCC system_header`` has no effect in the primary source file. On some targets, such as RS/6000 AIX, GCC implicitly surrounds all system headers with an :samp:`extern "C"` block when compiling as C++.