This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, C++] PR43824 pedantic with inline namespaces


Hello. 
The following patch adds the pedantic warning to inline namespaces if
the compiler is not in C++0x mode, as commented in PR43824.

Regards.
--
Rodrigo.

Index: parser.c
===================================================================
--- parser.c	(revision: 162531)
+++ parser.c	(copia de trabajo)
@@ -13210,6 +13210,9 @@ cp_parser_namespace_definition (cp_parse
 
   if (cp_lexer_next_token_is_keyword (parser->lexer, RID_INLINE))
     {
+      if (cxx_dialect < cxx0x && !in_system_header)
+	pedwarn (input_location, OPT_pedantic, 
+		   "ISO C++98 does not allow inline namespaces");
       is_inline = true;
       cp_lexer_consume_token (parser->lexer);
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]