2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / ext / attrib3.C
blob17a904c093cef1ad5001047e90640bccabab2b91
1 // Test that attributes work in a variety of situations.
2 // { dg-options -O }
3 // { dg-do run }
5 #define attrib __attribute ((mode (QI)))
7 attrib signed int a;            // attributes before type are broken
8 static attrib unsigned int b;
10 int foo(attrib int o)           // attribute arguments are broken
12   return (sizeof (a) != 1
13           || sizeof (b) != 1
14           || sizeof (o) != 1
15           || sizeof ((attrib signed int) b) != 1);
18 int main ()
20   return foo (42);