public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/40786]  New: Windows %I32 format confusion
@ 2009-07-17 15:59 jsm28 at gcc dot gnu dot org
  2009-07-19  8:55 ` [Bug target/40786] " ktietz at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-07-17 15:59 UTC (permalink / raw)
  To: gcc-bugs

http://msdn.microsoft.com/en-us/library/tcxf1dw6(VS.71).aspx
says that the Windows %I32 printf formats take arguments of type __int32
or unsigned __int32.

config/i386/msformat-c.c defines these using FMT_LEN_l, i.e. type long.
It appears that MinGW uses long for __int32, but MinGW-W64 uses int
(despite long being 32-bit for Win64), and so the compiler should
distinguish between these cases - or, in this special case, allow both
types.  (I don't know what __int32 is with the MS compiler, for either
32-bit or 64-bit.)

The testcase gcc.dg/format/ms-format1.c passes an int value to this format,
and so fails.  sys_format.c passes a long value, and so passes.  Clearly
both should pass the same type.


-- 
           Summary: Windows %I32 format confusion
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jsm28 at gcc dot gnu dot org
GCC target triplet: *-*-mingw*


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


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

end of thread, other threads:[~2009-10-30 17:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-17 15:59 [Bug target/40786] New: Windows %I32 format confusion jsm28 at gcc dot gnu dot org
2009-07-19  8:55 ` [Bug target/40786] " ktietz at gcc dot gnu dot org
2009-07-19  9:34 ` sezeroz at gmail dot com
2009-08-18 11:32 ` ktietz at gcc dot gnu dot org
2009-08-21 19:22 ` ktietz at gcc dot gnu dot org
2009-08-22 10:07 ` ktietz at gcc dot gnu dot org
2009-08-22 16:44 ` joseph at codesourcery dot com
2009-08-22 17:31 ` ktietz at gcc dot gnu dot org
2009-08-23 11:00 ` ktietz at gcc dot gnu dot org
2009-08-24  6:20 ` ktietz at gcc dot gnu dot org
2009-10-30 17:52 ` ktietz 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).