From 296e379a5087be494b8fc35011954c5ea073ba83 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 11 Dec 2018 17:46:42 +0000 Subject: [PATCH] decl2.c (grokvardecl): Add location_t parameter and use it in build_lang_decl_loc and build_decl calls. /cp 2018-12-11 Paolo Carlini * decl2.c (grokvardecl): Add location_t parameter and use it in build_lang_decl_loc and build_decl calls. (grokdeclarator): Move up loc declaration and use it in the grokvardecl call too. /testsuite 2018-12-11 Paolo Carlini * g++.dg/pr53037-4.C: Test the first two locations too. From-SVN: r267027 --- gcc/cp/ChangeLog | 7 +++++++ gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/g++.dg/pr53037-4.C | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 672be2d072d..50b8c5a3aca 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2018-12-11 Paolo Carlini + + * decl2.c (grokvardecl): Add location_t parameter and use it + in build_lang_decl_loc and build_decl calls. + (grokdeclarator): Move up loc declaration and use it in the + grokvardecl call too. + 2018-12-09 Cesar Philippidis * parser.c (cp_parser_oacc_kernels_parallel): Adjust EXPR_LOCATION diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e69abe6288b..8980dd2b2f1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2018-12-11 Paolo Carlini + + * g++.dg/pr53037-4.C: Test the first two locations too. + 2018-12-11 Jakub Jelinek PR tree-optimization/88444 diff --git a/gcc/testsuite/g++.dg/pr53037-4.C b/gcc/testsuite/g++.dg/pr53037-4.C index f73f35f8237..e887334fc8b 100644 --- a/gcc/testsuite/g++.dg/pr53037-4.C +++ b/gcc/testsuite/g++.dg/pr53037-4.C @@ -2,11 +2,11 @@ /* { dg-do compile } */ /* { dg-options "-O0" } */ -int foo1 __attribute__((warn_if_not_aligned(8))); /* { dg-error "'warn_if_not_aligned' may not be specified for 'foo1'" } */ +int foo1 __attribute__((warn_if_not_aligned(8))); /* { dg-error "5:'warn_if_not_aligned' may not be specified for 'foo1'" } */ __attribute__((warn_if_not_aligned(8))) void -foo2 (void) /* { dg-error "'warn_if_not_aligned' may not be specified for 'void foo2\\(\\)'" } */ +foo2 (void) /* { dg-error "1:'warn_if_not_aligned' may not be specified for 'void foo2\\(\\)'" } */ { } -- 2.30.2