aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2017-06-27 07:16:29 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2017-06-27 07:16:29 +0000
commit0c41863093aedb7bc7e3771bebb070e8f433b17f (patch)
tree5104d5c854a3bb1c46702edb8128408c1cc1a2bc /gcc/cp
parentd25c0cc1a537adf0dbbacad88f2f4dc20e9edd26 (diff)
downloadgcc-0c41863093aedb7bc7e3771bebb070e8f433b17f.zip
gcc-0c41863093aedb7bc7e3771bebb070e8f433b17f.tar.gz
gcc-0c41863093aedb7bc7e3771bebb070e8f433b17f.tar.bz2
re PR bootstrap/81216 (bootstrap failed on i386 and powerpc64le)
PR bootstrap/81216 * parser.c (cp_parser_already_scoped_statement): Initialize LOC_AFTER_LABELS. * g++.dg/warn/Wmultistatement-macros-1.C: New test. From-SVN: r249676
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/parser.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c067d23..53aadf4 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2017-06-27 Marek Polacek <polacek@redhat.com>
+
+ PR bootstrap/81216
+ * parser.c (cp_parser_already_scoped_statement): Initialize
+ LOC_AFTER_LABELS.
+
2017-06-26 Jason Merrill <jason@redhat.com>
PR c++/81215 - deduction failure with variadic TTP.
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index c405fe5..573b97a 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -12438,7 +12438,7 @@ cp_parser_already_scoped_statement (cp_parser* parser, bool *if_p,
{
token_indent_info body_tinfo
= get_token_indent_info (cp_lexer_peek_token (parser->lexer));
- location_t loc_after_labels;
+ location_t loc_after_labels = UNKNOWN_LOCATION;
cp_parser_statement (parser, NULL_TREE, false, if_p, NULL,
&loc_after_labels);
@@ -12446,7 +12446,8 @@ cp_parser_already_scoped_statement (cp_parser* parser, bool *if_p,
= get_token_indent_info (cp_lexer_peek_token (parser->lexer));
warn_for_misleading_indentation (guard_tinfo, body_tinfo, next_tinfo);
- if (next_tinfo.type != CPP_SEMICOLON)
+ if (loc_after_labels != UNKNOWN_LOCATION
+ && next_tinfo.type != CPP_SEMICOLON)
warn_for_multistatement_macros (loc_after_labels, next_tinfo.location,
guard_tinfo.location,
guard_tinfo.keyword);