+2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR preprocessor/47823
+ * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
+ documentation to...
+ (Pragmas): ...here.
+ * doc/extend.texi (Pragmas): Note additional pragmas documented
+ in the CPP manual.
+
2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
PR middle-end/86677
@samp{#import} and @samp{#include} to refer to the same header file.
Another way to prevent a header file from being included more than once
-is with the @samp{#pragma once} directive. If @samp{#pragma once} is
-seen when scanning a header file, that file will never be read again, no
-matter what.
-
+is with the @samp{#pragma once} directive (@pxref{Pragmas}).
@samp{#pragma once} does not have the problems that @samp{#import} does,
but it is not recognized by all preprocessors, so you cannot rely on it
in a portable program.
@node Pragmas
@chapter Pragmas
+@cindex pragma directive
+
The @samp{#pragma} directive is the method specified by the C standard
for providing additional information to the compiler, beyond what is
conveyed in the language itself. The forms of this directive
(commonly known as @dfn{pragmas}) specified by C standard are prefixed with
@code{STDC}. A C compiler is free to attach any meaning it likes to other
-pragmas. All GNU-defined, supported pragmas have been given a
+pragmas. Most GNU-defined, supported pragmas have been given a
@code{GCC} prefix.
@cindex @code{_Pragma}
the @samp{#warning} and @samp{#error} directives, these pragmas can be
embedded in preprocessor macros using @samp{_Pragma}.
+@item #pragma once
+If @code{#pragma once} is seen when scanning a header file, that
+file will never be read again, no matter what. It is a less-portable
+alternative to using @samp{#ifndef} to guard the contents of header files
+against multiple inclusions.
+
@end ftable
@node Other Directives