------- Comment #6 from ubizjak at gmail dot com 2009-09-17 12:46 ------- Your d_a is defined as double, so gcc truncates constant to fit in the "double" value range. After that, you pass this double value as an argument to %Lf, which is wrong. You should write:
printf("long double - double double = %+5.30Lf\n", (long double) d_a); As far as your testcse is concerned, there is no error, truncation from long double to double is what you requested with "double" intermediate register. -- ubizjak at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31006