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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.dg/] [ext/] [packed7.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// 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  
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
}

powered by: WebSVN 2.1.0

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