Re: [PATCH] PR c++/54955 - Fail to parse alignas expr at the beginning of a declaration

2012-10-30 Thread Jason Merrill
OK. Jason

Re: [PATCH] PR c++/54955 - Fail to parse alignas expr at the beginning of a declaration

2012-10-27 Thread Dodji Seketeli
Jason Merrill ja...@redhat.com writes: On 10/26/2012 01:37 PM, Dodji Seketeli wrote: cp_next_tokens_can_be_std_attribute_p (cp_parser *parser) { - return cp_nth_tokens_can_be_std_attribute_p (parser, 1); + cp_token *token = cp_lexer_peek_token (parser-lexer); + + return (cxx_dialect

[PATCH] PR c++/54955 - Fail to parse alignas expr at the beginning of a declaration

2012-10-26 Thread Dodji Seketeli
Hello, In this PR, G++ embarrassingly fails to parse the simple alignas expression below: alignas(double) int f; even though the simple-declaration production in Clause 7 suggests otherwise. Fixed thus and tested on x86_64-unknown-linux-gnu against trunk. gcc/cp PR c++/54955

Re: [PATCH] PR c++/54955 - Fail to parse alignas expr at the beginning of a declaration

2012-10-26 Thread Jason Merrill
On 10/26/2012 01:37 PM, Dodji Seketeli wrote: cp_next_tokens_can_be_std_attribute_p (cp_parser *parser) { - return cp_nth_tokens_can_be_std_attribute_p (parser, 1); + cp_token *token = cp_lexer_peek_token (parser-lexer); + + return (cxx_dialect = cxx0x + (token-type == CPP_KEYWORD