diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-04 20:03:55 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-04 20:03:55 +0000 |
commit | 3078f2b2bfb8aba10e9b59dd1012fbfa55abbcab (patch) | |
tree | db0e598a611fbe90ebcaf267b9665fd02c67a70f /gcc/doc/cppopts.texi | |
parent | 35cb45c4eaeb15d82c29d4555824c4fe2f7d1678 (diff) | |
download | gcc-3078f2b2bfb8aba10e9b59dd1012fbfa55abbcab.tar.gz |
* cppinit.c (cpp_create_reader, post_options): Warn about
trigraphs unless explicity set or -trigraphs.
* cpplex.c (warn_in_comment): New.
(_cpp_process_line_notes): Better handling of -Wtrigraphs.
(_cpp_skip_block_comment): Add call to _cpp_process_line_notes.
* doc/cppopts.texi, doc/cpp.texi: Update.
testsuite:
* gcc.dg/cpp/Wtrigraphs.c: Update.
* gcc.dg/cpp/Wtrigraphs-2.c: New tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66459 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/cppopts.texi')
-rw-r--r-- | gcc/doc/cppopts.texi | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/gcc/doc/cppopts.texi b/gcc/doc/cppopts.texi index 9212c80f755..490905a065c 100644 --- a/gcc/doc/cppopts.texi +++ b/gcc/doc/cppopts.texi @@ -69,10 +69,12 @@ use @option{-o} to specify the output file. @item -Wall @opindex Wall -Turns on all optional warnings which are desirable for normal code. At -present this is @option{-Wcomment} and @option{-Wtrigraphs}. Note that -many of the preprocessor's warnings are on by default and have no -options to control them. +Turns on all optional warnings which are desirable for normal code. +At present this is @option{-Wcomment}, @option{-Wtrigraphs}, +@option{-Wmultichar} and a warning about integer promotion causing a +change of sign in @code{#if} expressions. Note that many of the +preprocessor's warnings are on by default and have no options to +control them. @item -Wcomment @itemx -Wcomments @@ -84,10 +86,13 @@ comment, or whenever a backslash-newline appears in a @samp{//} comment. @item -Wtrigraphs @opindex Wtrigraphs -Warn if any trigraphs are encountered. This option used to take effect -only if @option{-trigraphs} was also specified, but now works -independently. Warnings are not given for trigraphs within comments, as -they do not affect the meaning of the program. +@anchor{Wtrigraphs} +Warn if any trigraphs that may change the meaning of a program are +encountered. This option is in effect unless trigraphs are turned on, +and is implied by @option{-Wall}. With the exception of a trigraph +that would form an escaped newline, warnings are not given for +trigraphs within comments as they do not affect the meaning of the +program. @item -Wtraditional @opindex Wtraditional |