gcc/testsuite/g++.old-deja/g++.brendan/sizeof5.C
raw| 1 | // { dg-do run } |
| 2 | // GROUPS passed sizeof |
| 3 | // ARM $5.3.2 |
| 4 | |
| 5 | extern "C" int printf (const char *, ...); |
| 6 | |
| 7 | class foo {}; |
| 8 | |
| 9 | int |
| 10 | main () |
| 11 | { |
| 12 | // The size of any class or class object is larger than zero. |
| 13 | int i = sizeof (foo); |
| 14 | if (i > 0) |
| 15 | printf ("PASS\n"); |
| 16 | else |
| 17 | { printf ("FAIL\n"); return 1; } |
| 18 | } |