in reply to Re: [XS] : "snprintf" portability options
in thread [XS] : "snprintf" portability options

Surely the UVuf is entirely supposed to give the right format to match the type of UV.

Sounds reasonable and I can't re-create the warnings in an Inline::C script - there might be more to this than I initially realized.
Here's a bit more detail regarding one of those warnings:
XS.xs: In function 'encode_sv': XS.xs:2449:66: warning: format '%u' expects argument of type 'unsigned + int', but argument 4 has type 'long long unsigned int' [-Wformat=] 2449 | enc->cur += snprintf (enc->cur, IVUV_MAXCHAR +S, "%" UVuf, UV_MAX); | + ^~~
(It's getting late over here.)

Cheers,
Rob

Replies are listed 'Best First'.
Re^3: [XS] : "snprintf" portability options
by NERDVANA (Priest) on Sep 16, 2024 at 03:24 UTC
    I hear a lot about new versions of gcc making it a fatal error to declare "void main", which tends to break short test programs during configure scripts and results in tests coming out false when they should return true. They can be hard to catch if a test is false on a majority of systems anyway. Maybe perl is affected?