diff options
author | Tom Tromey <tromey@redhat.com> | 2011-03-14 17:58:12 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2011-03-14 17:58:12 +0000 |
commit | b3ab9ea2979fd0fcc2a3eff1f0c417c5e6f27f35 (patch) | |
tree | 2f7867edf299867952cbd5c600cffe758a60b115 /gcc/c-parser.c | |
parent | d8d4db3345ec3271a5edf4bd84e999662cd8e2e2 (diff) | |
download | gcc-b3ab9ea2979fd0fcc2a3eff1f0c417c5e6f27f35.tar.gz |
c-parser.c (disable_extension_diagnostics): Save warn_overlength_strings.
gcc
* c-parser.c (disable_extension_diagnostics): Save
warn_overlength_strings.
(restore_extension_diagnostics): Restore warn_overlength_strings.
gcc/testsuite
* gcc.dg/Woverlength-strings-pedantic-c89-ext.c: New file.
* gcc.dg/Woverlength-strings-pedantic-c90-ext.c: New file.
* gcc.dg/Woverlength-strings-pedantic-c99-ext.c: New file.
From-SVN: r170947
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r-- | gcc/c-parser.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c index 69ce2e50bef..7b18827cfc6 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -1045,13 +1045,15 @@ disable_extension_diagnostics (void) | (warn_traditional << 2) | (flag_iso << 3) | (warn_long_long << 4) - | (warn_cxx_compat << 5)); + | (warn_cxx_compat << 5) + | (warn_overlength_strings << 6)); cpp_opts->cpp_pedantic = pedantic = 0; warn_pointer_arith = 0; cpp_opts->cpp_warn_traditional = warn_traditional = 0; flag_iso = 0; cpp_opts->cpp_warn_long_long = warn_long_long = 0; warn_cxx_compat = 0; + warn_overlength_strings = 0; return ret; } @@ -1067,6 +1069,7 @@ restore_extension_diagnostics (int flags) flag_iso = (flags >> 3) & 1; cpp_opts->cpp_warn_long_long = warn_long_long = (flags >> 4) & 1; warn_cxx_compat = (flags >> 5) & 1; + warn_overlength_strings = (flags >> 6) & 1; } /* Possibly kinds of declarator to parse. */ |