2023-12-08 23:17 UTC+0100 Phil Krylov (phil a t krylov.eu)

305 views
Skip to first unread message

Phil Krylov

unread,
Dec 8, 2023, 5:45:40 PM12/8/23
to harbou...@googlegroups.com
2023-12-08 23:17 UTC+0100 Phil Krylov (phil a t krylov.eu)
* contrib/sddsqlt3/core.c
! Fixed a different signedness compare warning.

Luigi Ferraris

unread,
Jan 15, 2024, 10:09:15 AMJan 15
to Harbour Developers
Hi Phil,
today I have compiled Harbour from sources, using "gcc (Rev5, Built by MSYS2 project) 10.3.0" on Windows
andI get  this warning:
../../../hbpp.c: In function 'hb_pp_generateVerInfo':
../../../hbpp.c:353:22: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'HB_MAXINT' {aka 'long long int'} [-Wformat=]
  353 |       fprintf( fout, "#define HB_VER_REVID             %" PFHL "ulu\n", nRevID );
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~               ~~~~~~
      |                                                                         |
      |                                                                         HB_MAXINT {aka long long int}

Best regards,
Luigi Ferraris

Phil Krylov

unread,
Jan 22, 2024, 8:49:45 AMJan 22
to harbou...@googlegroups.com
Hi Luigi,

On Mon, 15 Jan 2024 at 16:09, Luigi Ferraris <luigfe...@gmail.com> wrote:
> today I have compiled Harbour from sources, using "gcc (Rev5, Built by MSYS2 project) 10.3.0" on Windows
> andI get this warning:
> ../../../hbpp.c: In function 'hb_pp_generateVerInfo':
> ../../../hbpp.c:353:22: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'HB_MAXINT' {aka 'long long int'} [-Wformat=]
> 353 | fprintf( fout, "#define HB_VER_REVID %" PFHL "ulu\n", nRevID );

Thanks! To be able to reproduce the issue, one would need to know if
you're building from the latest Harbour source (assumed yes) and what
version of MinGW-W64 runtime (not just the gcc compiler but the
headers) is used. Also, the actual failing gcc command llne would be
helpful. On the GitHub CI, with rolling-release MSYS2, the warning
does not reproduce.

This is a change probably related to your issue:
https://github.com/harbour/core/pull/333/files

-- Ph.

Luigi Ferraris

unread,
Jan 23, 2024, 4:40:39 AMJan 23
to Harbour Developers
Hi Phil,

a) about Harbour, yes is a fresh copy; anyhow this is the Changelog reference $Id: 35ddd0a104ff103f99eaa3e055d351495b483253 $

b) about msys I have used "gcc -v" command and below the output.
But WARNING: I'm building 32bit so I don't know if can be related to mingw.mk test
ifeq ($(HB_COMPILER),mingw64)
   # Newer MinGW-W64 versions (10+, IIRC) need this to opt out of C99 format
   # string emulation and keep our format strings compatible among the
   # different Windows compilers
   CFLAGS += -D__USE_MINGW_ANSI_STDIO=0
endif

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=C:/sviclip/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.3.0/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: ../gcc-10.3.0/configure --prefix=/mingw32 --with-local-prefix=/mingw32/local --build=i686-w64-mingw32 --host=i686-w64-mingw32 --target=i686-w64-mingw32 --with-native-system-header-dir=/mingw32/i686-w64-mingw32/include --libexecdir=/mingw32/lib --enable-bootstrap --enable-checking=release --with-arch=i686 --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-lto --enable-libgomp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw32 --with-mpfr=/mingw32 --with-mpc=/mingw32 --with-isl=/mingw32 --with-pkgversion='Rev5, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --with-boot-ldflags='-pipe -Wl,--dynamicbase,--nxcompat,--no-seh -Wl,--large-address-aware -Wl,--disable-dynamicbase -static-libstdc++ -static-libgcc' 'LDFLAGS_FOR_TARGET=-pipe -Wl,--dynamicbase,--nxcompat,--no-seh -Wl,--large-address-aware' --enable-linker-plugin-flags='LDFLAGS=-static-libstdc++\ -static-libgcc\ -pipe\ -Wl,--dynamicbase,--nxcompat,--no-seh\ -Wl,--large-address-aware\ -Wl,--stack,12582912' --disable-sjlj-exceptions --with-dwarf2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.3.0 (Rev5, Built by MSYS2 project)


c) command line to build Harbour is very simple: after setting right path[s] I have used "mingw32-make.exe" within Harbour directory

I hope this info can help you. I'm to your disposal. 
Many thanks to you and other developers for the job.
Regards
Luigi
Reply all
Reply to author
Forward
0 new messages