[Bug preprocessor/47823] #pragma once is documented in a weird spot
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jan 28 19:16:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47823
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |documentation
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-01-28
Summary|#pragma once not documented |#pragma once is documented
| |in a weird spot
Ever Confirmed|0 |1
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-28 19:01:42 UTC ---
Confirmed really it is documented but just under #import documentation. It
really should be under its own:
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.
@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.
More information about the Gcc-bugs
mailing list