diff options
author | Jason Merrill <jason@redhat.com> | 2014-10-15 10:12:24 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2014-10-15 10:12:24 -0400 |
commit | 5f83e90bb6f44cb079edf65b55f3caab34c42516 (patch) | |
tree | d4540d6292cb29ad0a829b9d951b84d6a3058e85 /gcc/c-family | |
parent | 327a79a52392f9fec4c92693278fe8d362bc7008 (diff) | |
download | gcc-5f83e90bb6f44cb079edf65b55f3caab34c42516.zip gcc-5f83e90bb6f44cb079edf65b55f3caab34c42516.tar.gz gcc-5f83e90bb6f44cb079edf65b55f3caab34c42516.tar.bz2 |
re PR c++/63455 (decltype of statement expression internal compiler error: in cp_parser_abort_tentative_parse, at cp/parser.c:25062)
PR c++/63455
c-family/
* c-common.h (CPP_PREPARSED_EXPR): New.
(N_CP_TTYPES): Adjust.
cp/
* parser.c (struct saved_token_sentinel): New.
(cp_parser_statement): Use it.
(cp_parser_start_tentative_firewall): New.
(cp_parser_end_tentative_firewall): New.
(cp_parser_lambda_expression): Use them.
(cp_parser_statement_expr): New.
(cp_parser_primary_expression): Use it.
From-SVN: r216260
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-family/c-common.h | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 056a0d5..7c51528 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2014-10-14 Jason Merrill <jason@redhat.com> + + PR c++/63455 + * c-common.h (CPP_PREPARSED_EXPR): New. + (N_CP_TTYPES): Adjust. + 2014-10-15 Marek Polacek <polacek@redhat.com> * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C. diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index fec9a06..b45ccfc 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -361,8 +361,11 @@ struct c_common_resword /* A token type for pre-parsed C++0x decltype. */ #define CPP_DECLTYPE ((enum cpp_ttype) (CPP_NESTED_NAME_SPECIFIER + 1)) +/* A token type for pre-parsed primary-expression (lambda- or statement-). */ +#define CPP_PREPARSED_EXPR ((enum cpp_ttype) (CPP_DECLTYPE + 1)) + /* The number of token types, including C++-specific ones. */ -#define N_CP_TTYPES ((int) (CPP_DECLTYPE + 1)) +#define N_CP_TTYPES ((int) (CPP_PREPARSED_EXPR + 1)) /* Disable mask. Keywords are disabled if (reswords[i].disable & mask) is _true_. Thus for keywords which are present in all |