c++: robustify testcase [PR109752]
[official-gcc.git] / gcc / testsuite / g++.dg / parse / defarg5.C
bloba81b3c4d391de2a3b797db23466a40d605b52c91
1 // { dg-do compile }
3 // Copyright (C) 2003 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 5 Sep 2003 <nathan@codesourcery.com>
5 // Origin:Wolfgang Bangerth bangerth@dealii.org
7 // PR c++/12167 - infinite recursion
9 typedef int int32_t __attribute__((mode (__SI__)));
10 typedef unsigned uint32_t __attribute__((mode (__SI__)));
12 class A {   
13   void report(int32_t d
14               // the default arg is what NAN etc can expand to, but
15               // with the floatiness removed.
16               = (__extension__ ((union { uint32_t l; int32_t d; })
17                                 { l: 0x7fc00000U }).d));