[Bug preprocessor/21521] New: -finput-charset -save-temps converts characters twice
jsm28 at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed May 11 22:00:00 GMT 2005
Compile the following iso-8859-1 file with -finput-charset=iso-8859-1. In the
output the string has been converted to UTF-8 as documented. Compile it with
-finput-charset=iso-8859-1 -save-temps. In the output the string has been
converted to UTF-8, then that UTF-8 treated as ISO-8859-1 and converted to UTF-8
again, which is incorrect. If preprocessed output is always in UTF-8 then
preprocessed input must always be treated as in UTF-8 regardless of -finput-charset.
const char s[] = "§";
Compilation time test not requiring execution or scanning assembler:
int a = L'§';
compiled with -finput-charset=iso-8859-1 -save-temps gives a bogus "warning:
character constant too long for its type".
--
Summary: -finput-charset -save-temps converts characters twice
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: preprocessor
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=21521
More information about the Gcc-bugs
mailing list