Joseph Myers <jos...@codesourcery.com> wrote: > This patch adds support for the C2x [[]] attribute syntax to the C > front end.
> gcc.dg/gnu2x-attrs-1.c: New tests. This test fails on targets without symbol alias support, but it would be most unfortunate to skip it entirely with the usual dg-requires. In this instance, I propose to expect the error for Darwin as per the patch below, but open to other suggestions, if you prefer something different. OK / something else? thanks Iain gcc/testsuite/ChangeLog: 2019-11-16 Iain Sandoe <i...@sandoe.co.uk> * gcc.dg/gnu2x-attrs-1.c: Expect the alias case to produce an error on Darwin platforms. diff --git a/gcc/testsuite/gcc.dg/gnu2x-attrs-1.c b/gcc/testsuite/gcc.dg/gnu2x-attrs-1.c index df22fb3..fe7e95b 100644 --- a/gcc/testsuite/gcc.dg/gnu2x-attrs-1.c +++ b/gcc/testsuite/gcc.dg/gnu2x-attrs-1.c @@ -5,7 +5,7 @@ void f (void) {}; -[[gnu::alias("f")]] void g (void); +[[gnu::alias("f")]] void g (void); /* { dg-error "only weak" *-*-darwin* } */ void [[gnu::alias("f")]] h (void); /* { dg-warning "ignored" } */ /* { dg-message "that appertains to a type-specifier" "appertains" { target *-*-* } .-1 } */