public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/35908]  New: Dubious charset conversions
@ 2008-04-11 15:21 neil at gcc dot gnu dot org
  2008-04-11 16:59 ` [Bug c/35908] " joseph at codesourcery dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: neil at gcc dot gnu dot org @ 2008-04-11 15:21 UTC (permalink / raw)
  To: gcc-bugs

GCC accepts the following with -ansi -pedantic -Wall without diagnostics

#include <stdlib.h>
wchar_t z[] = L"a" "\xff";

GCC claims a default execution charset of UTF-8; presumably the default
execution wide character set is UTF-32.  But "\xff" is a two-character narrow
execution character set string literal, with characters \xff \0, which is
invalid UTF-8 and so cannot be converted in a meaningful way to the execution
character set (whatever it is).

I would expect the above code to be rejected, or at least diagnosed.


-- 
           Summary: Dubious charset conversions
           Product: gcc
           Version: 4.1.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: neil at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35908


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

end of thread, other threads:[~2009-03-30  1:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-11 15:21 [Bug c/35908] New: Dubious charset conversions neil at gcc dot gnu dot org
2008-04-11 16:59 ` [Bug c/35908] " joseph at codesourcery dot com
2008-04-12  4:40 ` neil at daikokuya dot co dot uk
2009-03-30  1:03 ` jsm28 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).