public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
[parent not found: <bug-21521-230@http.gcc.gnu.org/bugzilla/>]
* [Bug preprocessor/21521] New: -finput-charset -save-temps converts characters twice
@ 2005-05-11 22:00 jsm28 at gcc dot gnu dot org
  2005-08-27 22:25 ` [Bug preprocessor/21521] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 7+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2005-05-11 22:00 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1156 bytes --]

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-01-06  0:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-21521-4@http.gcc.gnu.org/bugzilla/>
2012-01-06  0:23 ` [Bug preprocessor/21521] -finput-charset -save-temps converts characters twice pinskia at gcc dot gnu.org
     [not found] <bug-21521-230@http.gcc.gnu.org/bugzilla/>
2006-12-29  7:43 ` tromey at gcc dot gnu dot org
2006-12-30 23:11 ` tromey at gcc dot gnu dot org
2007-01-01 22:55 ` patchapp at dberlin dot org
2007-01-08  1:33 ` tromey at gcc dot gnu dot org
2009-03-29 22:15 ` jsm28 at gcc dot gnu dot org
2005-05-11 22:00 [Bug preprocessor/21521] New: " jsm28 at gcc dot gnu dot org
2005-08-27 22:25 ` [Bug preprocessor/21521] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).