This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/47823] #pragma once is documented in a weird spot


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]