Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.ext/anon3.C

raw
1 // { dg-do assemble }
2
3 // Copyright (C) 2001 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 6 Jun 2001 <[email protected]>
5
6 // Bug 2914. New types can be created in a static member
7 // initializer. These should not be injected into the member's class's
8 // scope.
9
10 class DoubleSupport
11 {
12 public:
13 static void toDouble();
14
15 static const double s_NaN;
16 static const double s_positiveInfinity;
17 static const double s_negativeInfinity;
18 static const double s_positiveZero;
19 static const double s_negativeZero;
20 static const unsigned long* s_NaNFirstDWORD;
21 static const unsigned long* s_NaNSecondDWORD;
22 };
23
24 const double DoubleSupport::s_positiveInfinity =
25 (__extension__ ((union { unsigned char __c[8]; double __d; })
26 { __c: { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } }).__d);
27
28 struct other
29 {
30 };
31
32
33 void
34 DoubleSupport::toDouble()
35 {
36 }