aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.dg
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2022-06-24 15:30:13 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2022-06-24 20:54:03 +0200
commit5959cf8217e90b1331170fce96d83dd796a2bd8d (patch)
treed6325f42811f2b1bfba3644220a5b93af623e325 /gcc/testsuite/gdc.dg
parent91418c42089cd1cbe71edcd6b2f5b26559819372 (diff)
downloadgcc-5959cf8217e90b1331170fce96d83dd796a2bd8d.zip
gcc-5959cf8217e90b1331170fce96d83dd796a2bd8d.tar.gz
gcc-5959cf8217e90b1331170fce96d83dd796a2bd8d.tar.bz2
d: Give consistent error message when attribute argument not a string constant
gcc/d/ChangeLog: * d-attribs.cc (d_handle_section_attribute): Update error message. (d_handle_symver_attribute): Likewise. (d_handle_no_sanitize_attribute): Likewise. (d_handle_visibility_attribute): Likewise. gcc/testsuite/ChangeLog: * gdc.dg/attr_section1.d: Update dg-error. * gdc.dg/attr_visibility1.d: Likewise.
Diffstat (limited to 'gcc/testsuite/gdc.dg')
-rw-r--r--gcc/testsuite/gdc.dg/attr_section1.d2
-rw-r--r--gcc/testsuite/gdc.dg/attr_visibility1.d2
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/testsuite/gdc.dg/attr_section1.d b/gcc/testsuite/gdc.dg/attr_section1.d
index c24634f..759b203 100644
--- a/gcc/testsuite/gdc.dg/attr_section1.d
+++ b/gcc/testsuite/gdc.dg/attr_section1.d
@@ -7,7 +7,7 @@ import gcc.attributes;
struct S {} // { dg-warning ".section. attribute does not apply to types" }
@attribute("section", 123)
-int f1(); // { dg-error "section attribute argument not a string constant" }
+int f1(); // { dg-error ".section. attribute argument not a string constant" }
int f2(@section("param") int a) // { dg-error "section attribute not allowed for .a." }
{
diff --git a/gcc/testsuite/gdc.dg/attr_visibility1.d b/gcc/testsuite/gdc.dg/attr_visibility1.d
index a7ed406..932e6e6 100644
--- a/gcc/testsuite/gdc.dg/attr_visibility1.d
+++ b/gcc/testsuite/gdc.dg/attr_visibility1.d
@@ -13,7 +13,7 @@ void nested()
}
@attribute("visibility", 123)
-int not_a_string(); // { dg-error "visibility argument not a string" }
+int not_a_string(); // { dg-error ".visibility. attribute argument not a string constant" }
@attribute("visibility", "invalid argument")
int invalid_argument(); // { dg-error ".visibility. argument must be one of" }