diff options
| author | emsr <emsr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-09 15:10:43 +0000 |
|---|---|---|
| committer | emsr <emsr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-09 15:10:43 +0000 |
| commit | 9ce32611d45fd3ed98307b2454c286b8a8a36b26 (patch) | |
| tree | 885d396a61d4514592e18c8a9df3e2fa73a23b7c /libcpp | |
| parent | 7666a0b1f36e60a7257d431e77135d061cde4b0a (diff) | |
| download | ppe42-gcc-9ce32611d45fd3ed98307b2454c286b8a8a36b26.tar.gz ppe42-gcc-9ce32611d45fd3ed98307b2454c286b8a8a36b26.zip | |
libcpp/
2014-07-09 Edward Smith-Rowland <3dw4rd@verizon.net>
PR c++/58155 - -Wliteral-suffix warns about tokens which are skipped
by preprocessor
* lex.c (lex_raw_string ()): Do not warn about invalid suffix
if skipping. (lex_string ()): Ditto.
gcc/testsuite/
2014-07-09 Edward Smith-Rowland <3dw4rd@verizon.net>
PR c++/58155 - -Wliteral-suffix warns about tokens which are skipped
g++.dg/cpp0x/pr58155.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@212393 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp')
| -rw-r--r-- | libcpp/ChangeLog | 7 | ||||
| -rw-r--r-- | libcpp/lex.c | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 41510d22262..e0e39e37f5a 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,10 @@ +2014-07-09 Edward Smith-Rowland <3dw4rd@verizon.net> + + PR c++/58155 - -Wliteral-suffix warns about tokens which are skipped + by preprocessor + * lex.c (lex_raw_string ()): Do not warn about invalid suffix + if skipping. (lex_string ()): Ditto. + 2014-04-22 Release Manager * GCC 4.9.0 released. diff --git a/libcpp/lex.c b/libcpp/lex.c index a2168e4129c..6d69b591fec 100644 --- a/libcpp/lex.c +++ b/libcpp/lex.c @@ -1648,7 +1648,7 @@ lex_raw_string (cpp_reader *pfile, cpp_token *token, const uchar *base, if (is_macro (pfile, cur)) { /* Raise a warning, but do not consume subsequent tokens. */ - if (CPP_OPTION (pfile, warn_literal_suffix)) + if (CPP_OPTION (pfile, warn_literal_suffix) && !pfile->state.skipping) cpp_warning_with_line (pfile, CPP_W_LITERAL_SUFFIX, token->src_loc, 0, "invalid suffix on literal; C++11 requires " @@ -1777,7 +1777,7 @@ lex_string (cpp_reader *pfile, cpp_token *token, const uchar *base) if (is_macro (pfile, cur)) { /* Raise a warning, but do not consume subsequent tokens. */ - if (CPP_OPTION (pfile, warn_literal_suffix)) + if (CPP_OPTION (pfile, warn_literal_suffix) && !pfile->state.skipping) cpp_warning_with_line (pfile, CPP_W_LITERAL_SUFFIX, token->src_loc, 0, "invalid suffix on literal; C++11 requires " |

