Re: [Mingw-w64-public] how to printf() 64-bit integer in 64-bit compiler in strict ISO mode with all warnings enabled?

2017-06-26 Thread Lev Serebryakov
h> > prevents the preprocessor from restoring those macros if neither > or is included before : Problem is, here could be files which don't need nor neither , but need formatting macros. For example, if custom logging subsystem used (it is my case) or it

Re: [Mingw-w64-public] how to printf() 64-bit integer in 64-bit compiler in strict ISO mode with all warnings enabled?

2017-06-25 Thread Lev Serebryakov
Hello Kai, Friday, June 23, 2017, 5:55:39 PM, you wrote: >> I've checked and both _POSIX_C_SOURCE=1 and __USE_MINGW_ANSI_STDIO=1 >> don't affect this define. > It should, at least the latter one should show effect. Of course you > need to define it before including inttypes.h Very simple test

Re: [Mingw-w64-public] how to printf() 64-bit integer in 64-bit compiler in strict ISO mode with all warnings enabled?

2017-06-22 Thread Lev Serebryakov
IO=1 don't affect this define. -- // Black Lion AKA Lev Serebryakov signature.asc Description: OpenPGP digital signature -- Check out the vibrant tech community on one of the world's m

Re: [Mingw-w64-public] how to printf() 64-bit integer in 64-bit compiler in strict ISO mode with all warnings enabled?

2017-06-22 Thread Lev Serebryakov
indows not the gnu-ish variant. > > But you can explicit tell it, that you want to use a different > variant. Eg "__attribute__((__format__ (gnu_printf,..." for gnu-style. Oh, thank you! It is not obvious, as it is not mentioned in GCC documentation :) -- // Black Lion AKA Lev

Re: [Mingw-w64-public] how to printf() 64-bit integer in 64-bit compiler in strict ISO mode with all warnings enabled?

2017-06-22 Thread Lev Serebryakov
Hello Liu, Thursday, June 22, 2017, 4:46:33 AM, you wrote: >>> So, I need to printf() uint64_t in my project, which is built in strict >>> ISO C11 mode and with all warnings enabled. >> >>> If I try to use "%llu" I get warning that "unknown conversion type >>> character 'l' in format". If I

Re: [Mingw-w64-public] how to printf() 64-bit integer in 64-bit compiler in strict ISO mode with all warnings enabled?

2017-06-21 Thread Lev Serebryakov
Hello Lev, Wednesday, June 21, 2017, 11:41:45 PM, you wrote: > So, I need to printf() uint64_t in my project, which is built in strict > ISO C11 mode and with all warnings enabled. > If I try to use "%llu" I get warning that "unknown conversion type > character 'l' in format". If I use "%I64u"

[Mingw-w64-public] how to printf() 64-bit integer in 64-bit compiler in strict ISO mode with all warnings enabled?

2017-06-21 Thread Lev Serebryakov
And bonus question: how to print size_t, as %zu isn't supported either! -- // Black Lion AKA Lev Serebryakov signature.asc Description: OpenPGP digital signature -- Check out the vibrant te

[Mingw-w64-public] Does clang sanitizers supposed to work on mingw64?

2017-06-19 Thread Lev Serebryakov
Hello Mingw-w64-public, I have installed: mingw-w64-x86_64-clang 4.0.0-1 mingw-w64-x86_64-clang-analyzer 4.0.0-1 mingw-w64-x86_64-clang-tools-extra 4.0.0-1 mingw-w64-x86_64-compiler-rt 4.0.0-1 And I could not link project which is compiled with UB sanitizer, as linker could not find any __ubs

[Mingw-w64-public] Strange warnings from x86_64 clang (mingw-w64-x86_64-clang 4.0.0-1) when all warnings are enabled

2017-06-19 Thread Lev Serebryakov
Hello Mingw-w64-public, I have project which have (almost) all warnings enabled. It is built well with clang 4.0 on FreeBSD and mingw-w64-x86_64-gcc 6.3.0-3 on Windows. But when I try to build it with mingw-w64-x86_64-clang 4.0.0-1 on Windows I got warnings like this about vsnprintf() and str