diff options
Diffstat (limited to 'gcc/doc')
| -rw-r--r-- | gcc/doc/cppopts.texi | 18 | ||||
| -rw-r--r-- | gcc/doc/invoke.texi | 8 |
2 files changed, 25 insertions, 1 deletions
diff --git a/gcc/doc/cppopts.texi b/gcc/doc/cppopts.texi index 468f17f13fc..1b6307b2215 100644 --- a/gcc/doc/cppopts.texi +++ b/gcc/doc/cppopts.texi @@ -323,6 +323,24 @@ precompiled header would be listed and not the files that were used to create it because those files are not consulted when a precompiled header is used. +@item -fpch-preprocess +@opindex fpch-preprocess +This option allows use of a precompiled header (@pxref{Precompiled +Headers}) together with @option{-E}. It inserts a special @code{#pragma}, +@code{#pragma GCC pch_preprocess "<filename>"} in the output to mark +the place where the precompiled header was found, and its filename. When +@code{-fpreprocessed} is in use, GCC recognizes this @code{#pragma} and +loads the PCH. + +This option is off by default, because the resulting preprocessed output +is only really suitable as input to GCC. It is switched on by +@option{-save-temps}. + +You should not write this @code{#pragma} in your own code, but it is +safe to edit the filename if the PCH file is available in a different +location. The filename may be absolute or it may be relative to GCC's +current directory. + @end ifclear @item -x c @itemx -x c++ diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 2dd2b8239d7..fcfb521812f 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -11809,7 +11809,7 @@ which options are safe to change and which are not; the safest choice is to use exactly the same options when generating and using the precompiled header. The following are known to be safe: -@gccoptlist{-pedantic-errors} +@gccoptlist{-fpreprocessed -pedantic-errors} @end itemize @@ -11819,6 +11819,12 @@ find an option combination that doesn't work and doesn't cause the precompiled header to be ignored, please consider filing a bug report, see @ref{Bugs}. +If you do use differing options when generating and using the +precompiled header, the actual behaviour will be a mixture of the +behaviour for the options. For instance, if you use @option{-g} to +generate the precompiled header but not when using it, you may or may +not get debugging information for routines in the precompiled header. + @node Running Protoize @section Running Protoize |

