===================================================================
@@ -8,7 +8,7 @@
typedef struct {
char type_str[16];
char channel_hop;
-} drone_source_packet;
+} __attribute__((packed)) drone_source_packet;
drone_packet *
foo(char *x)
{
===================================================================
@@ -104,7 +104,7 @@ test2 (const H h)
S *s[3];
memset (s, 0, sizeof (S) * 3); /* { dg-warning "will always overflow" "memset" } */
- struct T { char a[8]; char b[4]; char c[10]; } t;
+ struct T { char a[8]; char b[4]; char c[10]; } __attribute__((packed)) t;
stpcpy (t.c,"Testing..."); /* { dg-warning "will always overflow" "stpcpy" } */
char b1[7];
===================================================================
@@ -2,7 +2,7 @@
// { dg-do compile }
// { dg-options "-O2" }
-struct A { char x[12], y[35]; };
+struct A { char x[12], y[35]; } __attribute__((packed));
struct B { char z[50]; };
inline void