On 12/17/2011 10:41 AM, Kai Tietz wrote:
> 2011/12/17 Ozkan Sezer:
>> On Sat, Dec 17, 2011 at 6:09 PM, David Cleaver wrote:
>>>
>>>
>>> On 12/17/2011 9:24 AM, Ozkan Sezer wrote:
>>>> On Sat, Dec 17, 2011 at 4:49 PM, David Cleaver  wrote:
>>> I know that putting
>>> #define __USE_MINGW_ANSI_STDIO 1
>>> at the top of the code will allow my build to be able to use %llu to print 
>>> the
>>> 64-bit variable.  However, I'm wondering why his compiler warns about the
>>> unknown llu modifier, but still prints the full 64-bit value.
>>
>> I don't have an answer for that,
>
> The ll width specifier isn't supported by all msvcrt version.
> Equivalent for target would be I64.  Beginning with OS Vista (IIRC)
> the msvcrt printf/scanf faimily routines are supporting ll, too.  But
> to avoid breakage with older msvcrt, gcc has to warn about it.
>
> See msvcrt.dll's version.  It is related to it.

I see lots of information online regarding when Visual Studio/Visual C++ 
versions started being able to use the ll modifier (since version VC++ 
2003/7.1, 
apparently), but I don't see the same information detailing when msvcrt.dll was 
able to use the ll modifier.

On my Windows XP x64 SP2 computer, my c:\windows\system32\msvcrt.dll has 
version 
7.0.3790.3959.  I'd like to compile a list of msvcrt.dll versions and whether 
or 
not they support the ll modifier.

Would others on this list try to compile the following test program to see 
whether or not the full 64bit number is printed?  And after that, could you 
report back here to let us know if it worked or not, and what version of 
msvcrt.dll you have, and what version of OS you are running?

#include <stdio.h>
#include <inttypes.h>

int main(void) {
uintmax_t x = 1125899906842749LL;
printf("%llu\n", x);
return 0;
}




Kai/Ozkan, so when I compile a program with printf, how does mingw64 know which 
OS dll will handle the printf.  Or is an assumption made that msvcrt.dll will 
be 
available to handle the request?  Or do you just past the printf "to the OS" 
and 
the OS knows how to fill the printf request?

-David C.

------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to