Commit 0c418630 by Marek Polacek Committed by Marek Polacek

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
parent d25c0cc1
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> 2017-06-26 Jason Merrill <jason@redhat.com>
PR c++/81215 - deduction failure with variadic TTP. PR c++/81215 - deduction failure with variadic TTP.
......
...@@ -12438,7 +12438,7 @@ cp_parser_already_scoped_statement (cp_parser* parser, bool *if_p, ...@@ -12438,7 +12438,7 @@ cp_parser_already_scoped_statement (cp_parser* parser, bool *if_p,
{ {
token_indent_info body_tinfo token_indent_info body_tinfo
= get_token_indent_info (cp_lexer_peek_token (parser->lexer)); = 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, cp_parser_statement (parser, NULL_TREE, false, if_p, NULL,
&loc_after_labels); &loc_after_labels);
...@@ -12446,7 +12446,8 @@ cp_parser_already_scoped_statement (cp_parser* parser, bool *if_p, ...@@ -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)); = get_token_indent_info (cp_lexer_peek_token (parser->lexer));
warn_for_misleading_indentation (guard_tinfo, body_tinfo, next_tinfo); 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, warn_for_multistatement_macros (loc_after_labels, next_tinfo.location,
guard_tinfo.location, guard_tinfo.location,
guard_tinfo.keyword); guard_tinfo.keyword);
2017-06-27 Marek Polacek <polacek@redhat.com>
PR bootstrap/81216
* g++.dg/warn/Wmultistatement-macros-1.C: New test.
2017-06-26 Martin Sebor <msebor@redhat.com> 2017-06-26 Martin Sebor <msebor@redhat.com>
PR c++/81169 PR c++/81169
......
// PR bootstrap/81216
// { dg-options "-Wmultistatement-macros" }
// { dg-do compile }
template <typename A, typename B>
static bool
equal (A a, A b, B c)
{
for (; a != b; ++a, (void)++c)
if (!(*a == *c))
return false;
return true;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment