#58 printf support for long long

OTHER
closed
nobody
gcc (462)
wont-fix
Known_bugs
2013-01-21
2001-07-24
Anonymous
No

Hi,

In both latest and older MinGW release, I experimented
lack for "long long" support in "printf" and related
functions.

Trying to print an "unsigned long long" with "%llx"
or "%lld" results in only the 32 lest significant bits
to be shown.

bye
Marco

Discussion

  • Danny Smith

    Danny Smith - 2001-07-24

    Logged In: YES
    user_id=11494

    printf lives in MSVCRT.dll. It does not support "ll" prefix
    but uses "I64" instead. Nothing we can do about that.

    GCC will warn that I64 is an invalid format specifier but
    it does produce the correct result. This warning could be
    eliminated from GCC by changing compiler source code, but I
    don't want to do that. The warning does tell us that the
    code is not portable.

    Have a look at the inttypes.h header in the isocext package
    for some standard [portable] format spec macros for printf
    and scanf.

    Danny

     
  • Danny Smith

    Danny Smith - 2001-07-24

    Logged In: YES
    user_id=11494

    Not a MinGW bug.

    Although your problem may be interesting and causing you problems you wish answers to, it is not a problem with the
    MinGW project. Your BUG report has therefore been deleted.

     
  • Danny Smith

    Danny Smith - 2001-07-30
    • status: open --> closed-wont-fix
     
  • Earnie Boyd

    Earnie Boyd - 2013-01-21
    • status: closed-wont-fix --> closed
    • resolution: --> wont-fix
    • category: --> Known_bugs
    • milestone: Feature_requests --> OTHER
     

Log in to post a comment.