c-common.h (RID_FIRST_CXX0X): New.
authorDouglas Gregor <dgregor@osl.iu.edu>
Thu, 25 Jan 2007 04:04:18 +0000 (04:04 +0000)
committerDoug Gregor <dgregor@gcc.gnu.org>
Thu, 25 Jan 2007 04:04:18 +0000 (04:04 +0000)
2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>

* c-common.h (RID_FIRST_CXX0X): New.
(RID_LAST_CXX0X): New.
* c-opts.c (c_common_handle_option): -Wc++0x-compat is triggered
by -Wall.
* c.opt (Wc++0x-compat): New.
* doc/invoke.texi (-Wc++0x-compat): Document.

From-SVN: r121162

gcc/ChangeLog
gcc/c-common.h
gcc/c-opts.c
gcc/c.opt
gcc/doc/invoke.texi

index f0167fa..7040285 100644 (file)
@@ -1,3 +1,12 @@
+2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>
+
+       * c-common.h (RID_FIRST_CXX0X): New.
+       (RID_LAST_CXX0X): New.
+       * c-opts.c (c_common_handle_option): -Wc++0x-compat is triggered
+       by -Wall.
+       * c.opt (Wc++0x-compat): New.
+       * doc/invoke.texi (-Wc++0x-compat): Document.
+
 2007-01-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * builtins.c (fold_builtin_carg): New.
index 7b35256..78b3497 100644 (file)
@@ -108,6 +108,8 @@ enum rid
   RID_FIRST_MODIFIER = RID_STATIC,
   RID_LAST_MODIFIER = RID_ONEWAY,
 
+  RID_FIRST_CXX0X = RID_STATIC_ASSERT,
+  RID_LAST_CXX0X = RID_STATIC_ASSERT,
   RID_FIRST_AT = RID_AT_ENCODE,
   RID_LAST_AT = RID_AT_IMPLEMENTATION,
   RID_FIRST_PQ = RID_IN,
index 85ea6bb..720f72d 100644 (file)
@@ -417,6 +417,7 @@ c_common_handle_option (size_t scode, const char *arg, int value)
          /* C++-specific warnings.  */
          warn_reorder = value;
          warn_nontemplate_friend = value;
+          warn_cxx0x_compat = value;
           if (value > 0)
             warn_write_strings = true;
        }
index c5bf9be..6d3fa88 100644 (file)
--- a/gcc/c.opt
+++ b/gcc/c.opt
@@ -132,6 +132,9 @@ Wc++-compat
 C Var(warn_cxx_compat)
 Warn about C constructs that are not in the common subset of C and C++
 
+Wc++0x-compat
+C++ ObjC++ Var(warn_cxx0x_compat)
+Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 200x
 
 Wcast-qual
 C ObjC C++ ObjC++ Var(warn_cast_qual)
index 4cd0a43..18fee96 100644 (file)
@@ -223,8 +223,8 @@ Objective-C and Objective-C++ Dialects}.
 @xref{Warning Options,,Options to Request or Suppress Warnings}.
 @gccoptlist{-fsyntax-only  -pedantic  -pedantic-errors @gol
 -w  -Wextra  -Wall  -Waggregate-return -Walways-true -Warray-bounds @gol
--Wno-attributes -Wc++-compat -Wcast-align  -Wcast-qual  -Wchar-subscripts @gol
--Wclobbered  -Wcomment @gol
+-Wno-attributes -Wc++-compat -Wc++0x-compat -Wcast-align  -Wcast-qual  @gol
+-Wchar-subscripts -Wclobbered  -Wcomment @gol
 -Wconversion  -Wno-deprecated-declarations @gol
 -Wdisabled-optimization  -Wno-div-by-zero  @gol
 -Wempty-body  -Wno-endif-labels @gol
@@ -3149,6 +3149,11 @@ Warn about ISO C constructs that are outside of the common subset of
 ISO C and ISO C++, e.g.@: request for implicit conversion from
 @code{void *} to a pointer to non-@code{void} type.
 
+@item -Wc++0x-compat @r{(C++ and Objective-C++ only)}
+Warn about C++ constructs whose meaning differs between ISO C++ 1998 and
+ISO C++ 200x, e.g., identifiers in ISO C++ 1998 that will become keywords 
+in ISO C++ 200x.  This warning is enabled by @option{-Wall}.
+
 @item -Wcast-qual
 @opindex Wcast-qual
 Warn whenever a pointer is cast so as to remove a type qualifier from