OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [parse/] [attr1.C] - Blame information for rev 320

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// Test whether attributes are accepted both immediately after
2
// struct/union keyword and after the closing brace.
3
// { dg-do compile }
4
 
5
struct foo
6
{
7
  union __attribute__ ((packed))
8
  {
9
    int a;
10
    long b;
11
  };
12
  union __attribute__ ((packed)) __attribute__ ((unused))
13
  {
14
    int c;
15
    long d;
16
  };
17
};
18
 
19
union __attribute__ ((packed)) bar
20
{
21
  int c;
22
  long d;
23
};
24
 
25
struct __attribute__ ((packed)) baz
26
{
27
  int e;
28
  long f;
29
};
30
 
31
struct foo2
32
{
33
  union
34
  {
35
    int a;
36
    long b;
37
  } __attribute__ ((packed));
38
};
39
 
40
union bar2
41
{
42
  int c;
43
  long d;
44
} __attribute__ ((packed));
45
 
46
struct baz2
47
{
48
  int e;
49
  long f;
50
} __attribute__ ((packed));

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.