diff options
author | pfg <pfg@FreeBSD.org> | 2013-12-17 23:31:51 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2013-12-17 23:31:51 +0000 |
commit | fc9e1b74f0ee77d43fc81624531f99929f9b9e2c (patch) | |
tree | 221ecc524011c20bf624fa831693ee821cec0841 /contrib/gcc/cp/parser.c | |
parent | 97d5fc79048afc50ef9d43d560282f7a00971f08 (diff) | |
download | FreeBSD-src-fc9e1b74f0ee77d43fc81624531f99929f9b9e2c.zip FreeBSD-src-fc9e1b74f0ee77d43fc81624531f99929f9b9e2c.tar.gz |
gcc: small merges from upstream
Solves GCC issues:
PR middle-end/32602
PR middle-end/32603
Updates the to documentation and processing
improvement.
Obtained from: gcc 4.3 (rev. 119427, 126278, 126422; GPLv2)
MFC after: 2 weeks
Diffstat (limited to 'contrib/gcc/cp/parser.c')
-rw-r--r-- | contrib/gcc/cp/parser.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/gcc/cp/parser.c b/contrib/gcc/cp/parser.c index edbd37a..a021d5b 100644 --- a/contrib/gcc/cp/parser.c +++ b/contrib/gcc/cp/parser.c @@ -15637,6 +15637,16 @@ cp_parser_function_definition_from_specifiers_and_declarator cp_parser_skip_to_end_of_block_or_statement (parser); fn = error_mark_node; } + else if (DECL_INITIAL (current_function_decl) != error_mark_node) + { + /* Seen already, skip it. An error message has already been output. */ + cp_parser_skip_to_end_of_block_or_statement (parser); + fn = current_function_decl; + current_function_decl = NULL_TREE; + /* If this is a function from a class, pop the nested class. */ + if (current_class_name) + pop_nested_class (); + } else fn = cp_parser_function_definition_after_declarator (parser, /*inline_p=*/false); |