===================================================================
@@ -3029,6 +3029,11 @@ maybe_warn_cpp0x (cpp0x_warn_str str)
"defaulted and deleted functions "
"only available with -std=c++0x or -std=gnu++0x");
break;
+ case CPP0X_INLINE_NAMESPACES:
+ pedwarn (input_location, 0,
+ "inline namespaces "
+ "only available with -std=c++0x or -std=gnu++0x");
+ break;
default:
gcc_unreachable();
}
===================================================================
@@ -13246,6 +13447,7 @@ cp_parser_namespace_definition (cp_parser* parser)
if (cp_lexer_next_token_is_keyword (parser->lexer, RID_INLINE))
{
+ maybe_warn_cpp0x (CPP0X_INLINE_NAMESPACES);
is_inline = true;
cp_lexer_consume_token (parser->lexer);
}
===================================================================
@@ -387,7 +387,9 @@ typedef enum cpp0x_warn_str
/* scoped enums */
CPP0X_SCOPED_ENUMS,
/* defaulted and deleted functions */
- CPP0X_DEFAULTED_DELETED
+ CPP0X_DEFAULTED_DELETED,
+ /* inline namespaces */
+ CPP0X_INLINE_NAMESPACES
} cpp0x_warn_str;
/* The various kinds of operation used by composite_pointer_type. */