summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pragma-pack-3.c
blob: e276bd007fe3fde8443e49af56584e7b021f2e98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* PR c++/25294 */
/* { dg-options "-std=gnu99" } */
/* { dg-do run } */

extern void abort (void);

struct S
{
  char a[3];
#pragma pack(1) /* A block comment
		   that ends on the next line.  */
  struct T
  {
    char b;
    int c;
  } d;
#pragma pack /*/ */ () // C++ comment
  int e;
} s;

int
main ()
{
  if (sizeof (int) == 4 && sizeof (s) != 12)
    abort ();
  return 0;
}