aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index c0220bf..f5a6d94 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -18656,6 +18656,11 @@ cp_parser_namespace_definition (cp_parser* parser)
{
identifier = cp_parser_identifier (parser);
+ if (cp_next_tokens_can_be_std_attribute_p (parser))
+ pedwarn (input_location, OPT_Wpedantic,
+ "standard attributes on namespaces must precede "
+ "the namespace name");
+
/* Parse any attributes specified after the identifier. */
attribs = attr_chainon (attribs, cp_parser_attributes_opt (parser));
}