summaryrefslogtreecommitdiff
path: root/gcc/c-opts.c
diff options
context:
space:
mode:
authordgregor <dgregor@138bc75d-0d04-0410-961f-82ee72b054a4>2008-01-02 04:35:50 +0000
committerdgregor <dgregor@138bc75d-0d04-0410-961f-82ee72b054a4>2008-01-02 04:35:50 +0000
commit799bdf64de6dce47a56ba4144484a1b670bfb0dc (patch)
tree135035bda8ab77ed5c7cbc16dfbc4e18cf05251d /gcc/c-opts.c
parente8d9cba93ea5c5f9142438eb504420eb6614dc45 (diff)
downloadgcc-799bdf64de6dce47a56ba4144484a1b670bfb0dc.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131254 138bc75d-0d04-0410-961f-82ee72b054a4
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 a5c2270c025..3c6219265cd 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. */