aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-opts.c
diff options
context:
space:
mode:
authorDouglas Gregor <doug.gregor@gmail.com>2008-01-02 04:35:50 +0000
committerDoug Gregor <dgregor@gcc.gnu.org>2008-01-02 04:35:50 +0000
commit1a7817e4e80c5f7f84d61e6885adb2cfdd1e32e7 (patch)
tree135035bda8ab77ed5c7cbc16dfbc4e18cf05251d /gcc/c-opts.c
parent224e5fa7438e7f6489861fe39e59ad853cc49929 (diff)
downloadgcc-1a7817e4e80c5f7f84d61e6885adb2cfdd1e32e7.zip
gcc-1a7817e4e80c5f7f84d61e6885adb2cfdd1e32e7.tar.gz
gcc-1a7817e4e80c5f7f84d61e6885adb2cfdd1e32e7.tar.bz2
c-opts.c (sanitize_cpp_opts): Don't warn about "long long" when in C++0x mode.
2008-01-01 Douglas Gregor <doug.gregor@gmail.com> * c-opts.c (sanitize_cpp_opts): Don't warn about "long long" when in C++0x mode. 2008-01-01 Douglas Gregor <doug.gregor@gmail.com> * parser.c (cp_parser_check_decl_spec): Don't warn about "long long" in C++0x mode; change the warning to note that "long long" is only unsupported in C++98 mode. 2008-01-01 Douglas Gregor <doug.gregor@gmail.com> * g++.dg/cpp0x/long_long.C: New. From-SVN: r131254
Diffstat (limited to 'gcc/c-opts.c')
-rw-r--r--gcc/c-opts.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/c-opts.c b/gcc/c-opts.c
index a5c2270..3c62192 100644
--- a/gcc/c-opts.c
+++ b/gcc/c-opts.c
@@ -1429,7 +1429,11 @@ sanitize_cpp_opts (void)
/* We want -Wno-long-long to override -pedantic -std=non-c99
and/or -Wtraditional, whatever the ordering. */
cpp_opts->warn_long_long
- = warn_long_long && ((!flag_isoc99 && pedantic) || warn_traditional);
+ = warn_long_long && ((pedantic
+ && (c_dialect_cxx ()
+ ? cxx_dialect == cxx98
+ : !flag_isoc99))
+ || warn_traditional);
/* Similarly with -Wno-variadic-macros. No check for c99 here, since
this also turns off warnings about GCCs extension. */