From f94b7fe281dfcf8728125fef49f18b40ca01c6e0 Mon Sep 17 00:00:00 2001
From: dgregor <dgregor@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Sun, 4 Feb 2007 03:59:02 +0000
Subject: [PATCH] 2007-02-03  Douglas Gregor  <doug.gregor@gmail.com>

       * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
       keyword warning to -Wc++0x-compat.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121563 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/cp/ChangeLog | 5 +++++
 gcc/cp/parser.c  | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 661f89d77937..e545c6ca397f 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2007-02-03  Douglas Gregor  <doug.gregor@gmail.com>
+
+       * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
+       keyword warning to -Wc++0x-compat.
+	
 2007-02-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
 
 	* decl.c (grokdeclarator): Update documentation.
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index fa18e20b99e9..7578f848a1fe 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -449,7 +449,8 @@ cp_lexer_get_preprocessor_token (cp_lexer *lexer ATTRIBUTE_UNUSED ,
             {
               /* Warn about the C++0x keyword (but still treat it as
                  an identifier).  */
-              warning (0, "identifier %<%s%> will become a keyword in C++0x",
+              warning (OPT_Wc__0x_compat, 
+                       "identifier %<%s%> will become a keyword in C++0x",
                        IDENTIFIER_POINTER (token->u.value));
 
               /* Clear out the C_RID_CODE so we don't warn about this
-- 
GitLab