view gcc/testsuite/c-c++-common/pr89985.c @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 1830386684a0
children
line wrap: on
line source

/* Ensure that -Waddress-of-packed-member doesn't emit notes when
   suppressed via -w, rather than -Wno-address-of-packed-member.  */

/* { dg-do compile } */
/* { dg-options "-w" } */

struct a { /* { dg-bogus "defined here" } */
  void *ptr;
} __attribute__((packed));

struct b { /* { dg-bogus "defined here" } */
  void *ptr;
};

void
test (struct a *p)
{
  struct b *q = (struct b *)p;
}