This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR c/50332 (FAIL: gcc.dg/attr-invalid.c)
- From: Dodji Seketeli <dodji at redhat dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 08 Sep 2011 22:38:34 +0200
- Subject: [PATCH] Fix PR c/50332 (FAIL: gcc.dg/attr-invalid.c)
Hello,
To support -Wunused-local-typedefs we mark used typedef decls as being
used. Logically, __attribute__((used)) is no more ignored on typedef
decls. I forgot to adjust the relevant test of the test suite. My
testing should have caught that, but it somehow felt below my radar.
Sorry for that.
Tested against trunk on x86_64-unknown-linux-gnu.
From: Dodji Seketeli <dodji@redhat.com>
Date: Thu, 8 Sep 2011 21:52:16 +0200
Subject: [PATCH] Fix PR c/50332
gcc/testsuite/
* gcc.dg/attr-invalid.c: Adjust as __attribute__((used) is no more
ignored on typedefs.
---
gcc/testsuite/gcc.dg/attr-invalid.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/attr-invalid.c b/gcc/testsuite/gcc.dg/attr-invalid.c
index 6568c1a..cca82aa 100644
--- a/gcc/testsuite/gcc.dg/attr-invalid.c
+++ b/gcc/testsuite/gcc.dg/attr-invalid.c
@@ -35,9 +35,11 @@ int ATSYM(fn_vars) (void) {
#undef AT
#define AT used
-typedef int ATSYM(type) ATTR; /* { dg-warning "attribute ignored" "" } */
+typedef int ATSYM(type) ATTR; /* used attribute is no more
+ ignored. */
-typedef int (*ATSYM(fntype))(void) ATTR; /* { dg-warning "attribute ignored" "" } */
+typedef int (*ATSYM(fntype))(void) ATTR; /* used attribute is no more
+ ignored. */
struct ATSYM(struct) {
char dummy ATTR; /* { dg-warning "attribute ignored" "" } */
--
Dodji