OSDN Git Service

PR c++/4872
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.law / enum2.C
1 // Build don't link: 
2 // Special g++ Options: -fshort-enums
3 // GROUPS passed enums
4 // enum file
5 // From: Jeff Gehlhaar <jbg@qualcomm.com>
6 // Date:     Mon, 4 Jan 1993 09:20:50 -0700
7 // Subject:  Enum bug, affects library
8 // Message-ID: <9301041720.AA17340@harvey>
9
10 typedef unsigned long __fmtflags;
11 class ios {
12   public:
13     typedef __fmtflags fmtflags;
14     enum { skipws=01, left=02, right=04, internal=010,
15            dec=020, oct=040, hex=0100,
16            showbase=0200, showpoint=0400, uppercase=01000, showpos=02000,
17            scientific=04000, fixed=010000, unitbuf=020000, stdio=040000,
18            dont_close=0x80000000 //Don't delete streambuf on stream destruction
19            };
20
21     fmtflags setf (fmtflags, fmtflags);
22 };
23
24 // from <iostream.h>
25 inline ios& dec(ios& i)
26 { i.setf(ios::dec, ios::dec|ios::hex|ios::oct); return i; }
27