+2012-10-31 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/54955
+ * parser.c (cp_nth_tokens_can_be_std_attribute_p): Recognize the
+ 'Alignas' keyword as the beginning of a c++11 attribute specifier.
+ Update the comment of the function.
+ (cp_next_tokens_can_be_gnu_attribute_p): Update the comment of the
+ function.
+
2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
PR c++/54930
}
/* Return TRUE iff the next tokens in the stream are possibly the
- beginning of a standard C++-11 attribute. */
+ beginning of a standard C++-11 attribute specifier. */
static bool
cp_next_tokens_can_be_std_attribute_p (cp_parser *parser)
}
/* Return TRUE iff the next Nth tokens in the stream are possibly the
- beginning of a standard C++-11 attribute. */
+ beginning of a standard C++-11 attribute specifier. */
static bool
cp_nth_tokens_can_be_std_attribute_p (cp_parser *parser, size_t n)
cp_token *token = cp_lexer_peek_nth_token (parser->lexer, n);
return (cxx_dialect >= cxx0x
- && token->type == CPP_OPEN_SQUARE
- && (token = cp_lexer_peek_nth_token (parser->lexer, n + 1))
- && token->type == CPP_OPEN_SQUARE);
+ && ((token->type == CPP_KEYWORD && token->keyword == RID_ALIGNAS)
+ || (token->type == CPP_OPEN_SQUARE
+ && (token = cp_lexer_peek_nth_token (parser->lexer, n + 1))
+ && token->type == CPP_OPEN_SQUARE)));
}
/* Return TRUE iff the next Nth tokens in the stream are possibly the
+2012-10-31 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/54955
+ * g++.dg/cpp0x/gen-attrs-48-2.C: New test.
+
2012-10-31 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/19105