Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

What does pragma gcc system header do in gcc?


Asked by Ivy Navarro on Dec 04, 2021 FAQ



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 ‘#pragma’ in the file is not affected. #pragma GCC system_header has no effect in the primary source file.
Subsequently,
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 #pragma in the file will not be affected. #pragma GCC system_header has no effect in the primary source file.
Besides, #pragma GCC dependency allows you to check the relative dates of the current file and another file. If the other file is more recent than the current file, a warning is issued. This is useful if the current file is derived from the other file, and should be regenerated. The other file is searched for using the normal include search path.
Next,
There are, however, two ways to make normal headers into system headers: 1 Header files found in directories added to the search path with the -isystem and -idirafter command-line options are... 2 There is also a directive, 3 pragma GCC system_header, which tells GCC to consider the rest of the current include file a... More ...
In addition,
Most GNU-defined, supported pragmas have been given a GCC prefix. C99 introduced the _Pragma operator. This feature addresses a major problem with ‘#pragma’: being a directive, it cannot be produced as the result of macro expansion. _Pragma is an operator, much like sizeof or defined, and can be embedded in a macro.