gcc/testsuite/gcc.dg/unused-3.c
raw| 1 | /* Copyright (C) 2000 Free Software Foundation. */ |
| 2 | /* Added extra line-breaks to check that diagnostics refer to correct token. |
| 3 | --Per Bothner. */ |
| 4 | /* { dg-do compile } */ |
| 5 | /* { dg-options "-Wunused" } */ |
| 6 | |
| 7 | typedef short unused_type __attribute__ ((unused)); |
| 8 | int |
| 9 | main () |
| 10 | { |
| 11 | short |
| 12 | x /* { dg-warning "unused variable" "unused variable warning" } */ |
| 13 | ; |
| 14 | unused_type y; |
| 15 | } |