Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/ext/packed7.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // PR c++/14124 |
2 // A packed enum uses the minimal underlying type. | |
3 | |
4 // Copyright (C) 2004 Free Software Foundation, Inc. | |
5 // Contributed by Matt Austern <austern@apple.com> | |
6 | |
7 // { dg-do run } | |
8 | |
9 enum XXX { xyzzy = 3 } __attribute__((packed)); | |
10 | |
11 int main() | |
12 { | |
13 int enumsize = sizeof(xyzzy); | |
14 return (enumsize == 1) ? 0 : 1; | |
15 } |