real_nan presumes that its string argument is in the host character set, so __builtin_nan does not work in the presence of -fexec-charset making the target character set incompatible with the host character set. It should allow for the argument being in the target character set. (Other approaches such as special parsing so as not to translate the string argument to the target character set do not work since this function should also be used for a plain "nan" built-in function, bug 19984.)
-- Summary: real_nan and non-ASCII character sets Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jsm28 at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20111