Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/c2x-attr-deprecated-4.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 1830386684a0 |
children |
line wrap: on
line source
/* Test C2x deprecated attribute: duplicates. */ /* { dg-do compile } */ /* { dg-options "-std=c2x -pedantic-errors" } */ [[deprecated, __deprecated__]] int a; /* { dg-error "can appear at most once" } */ [[__deprecated__, deprecated("message")]] int b; /* { dg-error "can appear at most once" } */ int c [[deprecated("message"), deprecated]]; /* { dg-error "can appear at most once" } */ [[deprecated, deprecated]]; /* { dg-error "can appear at most once" } */ /* { dg-error "ignored" "ignored" { target *-*-* } .-1 } */ /* Separate attribute lists in the same attribute specifier sequence, with the same attribute in them, are OK. */ [[deprecated]] [[deprecated]] int d [[deprecated]] [[deprecated]];