From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Schwab To: mmitchell@usa.net Cc: law@cygnus.com, egcs@cygnus.com Subject: Re: libio bugs Date: Mon, 02 Feb 1998 02:38:00 -0000 Message-id: References: <26550.886365977@hurl.cygnus.com> <199802012255.WAA28117@quickstep.stanford.edu> X-SW-Source: 1998-02/msg00066.html Mark Mitchell writes: |>>>>>> "Jeffrey" == Jeffrey A Law writes: |> Jeffrey> (ostream::operator<<(double)) [_G_HAVE_PRINTF_FP]: Fix |> Jeffrey> order of initializers of struct printf_info to match |> Jeffrey> declaration order, to work around g++ bug. |> Jeffrey> (ostream::operator<<(long double)) [_G_HAVE_PRINTF_FP]: |> Jeffrey> Likewise. |> Since the order of initializers isn't supposed to matter, there is |> definitely a bug here if this fix makes a difference. Does anyone |> have a simple test-case for this bug? G++ simply ignores all initializer labels. I have already send a bug report, here it is again: $ cat init.cc struct X { int a, b; }; struct X f (int a, int b) { struct X y = { b: b, a: a }; // labels ignored by g++ return y; } int main () { struct X x = f (42, 0); if (x.a != 42 || x.b != 0) abort (); exit (0); } $ gcc init.cc $ ./a.out Aborted (core dumped) -- Andreas Schwab "And now for something schwab@issan.informatik.uni-dortmund.de completely different" schwab@gnu.org