[Bug binutils/29348] gdb/build: format specifies type 'unsigned long' but the argument has type 'bfd_size_type' (aka 'unsigned long long')
https://sourceware.org/bugzilla/show_bug.cgi?id=29348 --- Comment #11 from Alan Modra --- Created attachment 14247 --> https://sourceware.org/bugzilla/attachment.cgi?id=14247&action=edit proposed fix Please try out this patch. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/29348] gdb/build: format specifies type 'unsigned long' but the argument has type 'bfd_size_type' (aka 'unsigned long long')
https://sourceware.org/bugzilla/show_bug.cgi?id=29348 --- Comment #12 from Enze Li --- (In reply to Alan Modra from comment #11) > Created attachment 14247 [details] > proposed fix > > Please try out this patch. I saw the following error on OpenBSD7.1 with this patch, CC linker.lo linker.c:1869:21: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] if (((info)->type == type_relocatable)) ~^~~ linker.c:1869:21: note: remove extraneous parentheses around the comparison to silence this warning if (((info)->type == type_relocatable)) ~ ^ ~ linker.c:1869:21: note: use '=' to turn this equality comparison into an assignment if (((info)->type == type_relocatable)) ^~ = 1 error generated. gmake[4]: *** [Makefile:1752: linker.lo] Error 1 and the following on macOS(Intel) Catalina 10.15.7, CXXm2-exp.o In file included from m2-exp.y:42: In file included from ./language.h:26: In file included from ./symtab.h:39: ./split-name.h:34:3: error: expected identifier DOT, ^ m2-exp.c:163:13: note: expanded from macro 'DOT' #define DOT 302 ^ In file included from m2-exp.y:42: In file included from ./language.h:26: ./symtab.h:307:23: error: expected unqualified-id style = split_style::DOT; ^ m2-exp.c:163:13: note: expanded from macro 'DOT' #define DOT 302 ^ 2 errors generated. make[2]: *** [m2-exp.o] Error 1 -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/29348] gdb/build: format specifies type 'unsigned long' but the argument has type 'bfd_size_type' (aka 'unsigned long long')
https://sourceware.org/bugzilla/show_bug.cgi?id=29348 --- Comment #13 from Alan Modra --- Thanks for testing the patch, and verifying the BFD_VMA_FMT problem is fixed. if (((info)->type == type_relocatable)) ~^~~ linker.c:1869:21: note: remove extraneous parentheses around the comparison to silence this warning The above is a silly warning. The extra parens are from a macro expansion, and it is good programming practice use parentheses around macro expressions. Configure with --disable-werror to avoid turning this warning into an error. The m2-exp.y error is likely due to not using bison, or using an old version of bison to generate m2-exp.c. I don't think gdb requires that you use bison, so you might like to report this as a separate bug, specifying the version of bison or yacc on your system. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/29348] gdb/build: format specifies type 'unsigned long' but the argument has type 'bfd_size_type' (aka 'unsigned long long')
https://sourceware.org/bugzilla/show_bug.cgi?id=29348 --- Comment #14 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Alan Modra : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1a5178fe284547ef2abd8ae66588cd61c524 commit 1a5178fe284547ef2abd8ae66588cd61c524 Author: Alan Modra Date: Sun Jul 31 19:25:32 2022 +0930 PR29348, BFD_VMA_FMT wrong There is a problem with my commit 0e3c1eebb2, which replaced bfd_uint64_t with uint64_t: Some hosts typedef int64_t to long long even when long is the same size as long long. That confuses the code choosing one of "l", "ll", or "I64" for BFD_VMA_FMT, and results in warnings. Write a direct configure test for the printf int64_t style instead. This removes the last use of BFD_HOST_64BIT_LONG, so delete that. Note that the changes to configure.com are pure guesswork. PR 29348 * bfd-in.h (BFD_HOST_64BIT_LONG): Don't define. (BFD_VMA_FMT): Define using BFD_INT64_FMT when 64-bit. (bfd_vma, bfd_signed_vma): Move comments to 64-bit typedefs. * configure.ac (BFD_HOST_64BIT_LONG): Delete. (BFD_INT64_FMT): New config test. * configure.com: Update similarly. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/29348] gdb/build: format specifies type 'unsigned long' but the argument has type 'bfd_size_type' (aka 'unsigned long long')
https://sourceware.org/bugzilla/show_bug.cgi?id=29348 --- Comment #15 from cvs-commit at gcc dot gnu.org --- The binutils-2_39-branch branch has been updated by Alan Modra : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b336123a087f9a85e7b24d7e420bd44b9c9d3552 commit b336123a087f9a85e7b24d7e420bd44b9c9d3552 Author: Alan Modra Date: Sun Jul 31 19:25:32 2022 +0930 PR29348, BFD_VMA_FMT wrong There is a problem with my commit 0e3c1eebb2, which replaced bfd_uint64_t with uint64_t: Some hosts typedef int64_t to long long even when long is the same size as long long. That confuses the code choosing one of "l", "ll", or "I64" for BFD_VMA_FMT, and results in warnings. Write a direct configure test for the printf int64_t style instead. This removes the last use of BFD_HOST_64BIT_LONG, so delete that. Note that the changes to configure.com are pure guesswork. PR 29348 * bfd-in.h (BFD_HOST_64BIT_LONG): Don't define. (BFD_VMA_FMT): Define using BFD_INT64_FMT when 64-bit. (bfd_vma, bfd_signed_vma): Move comments to 64-bit typedefs. * configure.ac (BFD_HOST_64BIT_LONG): Delete. (BFD_INT64_FMT): New config test. * configure.com: Update similarly. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. (cherry picked from commit 1a5178fe284547ef2abd8ae66588cd61c524) -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/29348] gdb/build: format specifies type 'unsigned long' but the argument has type 'bfd_size_type' (aka 'unsigned long long')
https://sourceware.org/bugzilla/show_bug.cgi?id=29348 Alan Modra changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED Target Milestone|--- |2.39 --- Comment #16 from Alan Modra --- Fixed for 2.39. -- You are receiving this mail because: You are on the CC list for the bug.