Commit 1a7817e4 by Douglas Gregor Committed by Doug Gregor

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
parent 224e5fa7
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 Volker Reichelt <v.reichelt@netcologne.de> 2008-01-01 Volker Reichelt <v.reichelt@netcologne.de>
PR libmudflap/26442 PR libmudflap/26442
...@@ -1429,7 +1429,11 @@ sanitize_cpp_opts (void) ...@@ -1429,7 +1429,11 @@ sanitize_cpp_opts (void)
/* We want -Wno-long-long to override -pedantic -std=non-c99 /* We want -Wno-long-long to override -pedantic -std=non-c99
and/or -Wtraditional, whatever the ordering. */ and/or -Wtraditional, whatever the ordering. */
cpp_opts->warn_long_long 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 /* Similarly with -Wno-variadic-macros. No check for c99 here, since
this also turns off warnings about GCCs extension. */ this also turns off warnings about GCCs extension. */
......
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.
2007-12-20 Jason Merrill <jason@redhat.com> 2007-12-20 Jason Merrill <jason@redhat.com>
PR c++/34111 PR c++/34111
......
...@@ -2147,8 +2147,9 @@ cp_parser_check_decl_spec (cp_decl_specifier_seq *decl_specs) ...@@ -2147,8 +2147,9 @@ cp_parser_check_decl_spec (cp_decl_specifier_seq *decl_specs)
{ {
if (count > 2) if (count > 2)
error ("%<long long long%> is too long for GCC"); error ("%<long long long%> is too long for GCC");
else if (pedantic && !in_system_header && warn_long_long) else if (pedantic && !in_system_header && warn_long_long
pedwarn ("ISO C++ does not support %<long long%>"); && cxx_dialect == cxx98)
pedwarn ("ISO C++ 1998 does not support %<long long%>");
} }
else if (count > 1) else if (count > 1)
{ {
......
2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
* g++.dg/cpp0x/long_long.C: New.
2008-01-01 Andrew Pinski <andrew_pinski@playstation.sony.com> 2008-01-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
* gcc.target/spu/tag_manager.c : Include stdlib.h. * gcc.target/spu/tag_manager.c : Include stdlib.h.
// { dg-options "-std=c++0x -pedantic" }
void foo()
{
long long x = 17;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment