PR c/81779
* c-parser.c (c_parser_compound_statement_nostart): Call
expansion_point_location_if_in_system_header.
* gcc.dg/pr81779.c: New test.
From-SVN: r257271
+2018-01-31 Marek Polacek <polacek@redhat.com>
+
+ PR c/81779
+ * c-parser.c (c_parser_compound_statement_nostart): Call
+ expansion_point_location_if_in_system_header.
+
2018-01-17 David Malcolm <dmalcolm@redhat.com>
PR c++/83814
while (c_parser_next_token_is_not (parser, CPP_CLOSE_BRACE))
{
location_t loc = c_parser_peek_token (parser)->location;
+ loc = expansion_point_location_if_in_system_header (loc);
if (c_parser_next_token_is_keyword (parser, RID_CASE)
|| c_parser_next_token_is_keyword (parser, RID_DEFAULT)
|| (c_parser_next_token_is (parser, CPP_NAME)
+2018-01-31 Marek Polacek <polacek@redhat.com>
+
+ PR c/81779
+ * gcc.dg/pr81779.c: New test.
+
2018-01-31 Jakub Jelinek <jakub@redhat.com>
PR fortran/84116
--- /dev/null
+/* PR c/81779 */
+/* { dg-do compile } */
+/* { dg-options "-Wdeclaration-after-statement" } */
+
+#include <stdbool.h>
+
+bool
+f2 (char *p)
+{
+ if (!p)
+ return false;
+
+ bool ret = true; /* { dg-warning "ISO C90 forbids mixed declarations and code" } */
+ return ret;
+}