From c0916fa0b554070641233dfe8f91978d16c15f5c Mon Sep 17 00:00:00 2001 From: Catherine Moore Date: Mon, 8 May 2000 14:55:42 +0000 Subject: [PATCH] New test. From-SVN: r33767 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/unused-3.c | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/unused-3.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9170968c927..db283462b5d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2000-05-08 Catherine Moore + + * gcc.dg/unused-3.c: New. + 2000-05-06 Richard Henderson * g++.old-deja/g++.brendan/code-gen2.C: Cast to size_t, not int. diff --git a/gcc/testsuite/gcc.dg/unused-3.c b/gcc/testsuite/gcc.dg/unused-3.c new file mode 100644 index 00000000000..259b8d0fb79 --- /dev/null +++ b/gcc/testsuite/gcc.dg/unused-3.c @@ -0,0 +1,10 @@ +/* Copyright (C) 2000 Free Software Foundation. */ +/* { dg-do compile } */ +/* { dg-options "-Wunused" } */ + +typedef short unused_type __attribute__ ((unused)); +main () +{ + short x; /* { dg-warning "unused variable" "unused variable warning" } */ + unused_type y; +}