public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/104247] New: Compiler warnings on 32-bit system Date: Wed, 26 Jan 2022 16:37:02 +0000 [thread overview] Message-ID: <bug-104247-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104247 Bug ID: 104247 Summary: Compiler warnings on 32-bit system Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org Target Milestone: --- I noticed these and similar warnings when building the current master on i686-linux-gnu: ../../gcc/analyzer/constraint-manager.cc: In member function ‘void ana::bounded_ranges_manager::log_stats(ana::logger*, bool) const’: ../../gcc/analyzer/constraint-manager.cc:1027:27: warning: format ‘%li’ expects argument of type ‘long int’, but argument 4 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] 1027 | logger->log (" # %s: %li", "ranges", m_map.elements ()); | ~~^ ~~~~~~~~~~~~~~~~~ | | | | long int size_t {aka unsigned int} | %i g++ -fno-PIE -c -g -O2 -DIN_GCC -fPIC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I../../gcc/../libcody -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc/../libbacktrace -o x86-tune-sched-atom.o -MT x86-tune-sched-atom.o -MMD -MP -MF ./.deps/x86-tune-sched-atom.TPo ../../gcc/config/i386/x86-tune-sched-atom.cc g++ -fno-PIE -c -g -O2 -DIN_GCC -fPIC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I../../gcc/../libcody -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc/../libbacktrace -o x86-tune-sched-core.o -MT x86-tune-sched-core.o -MMD -MP -MF ./.deps/x86-tune-sched-core.TPo ../../gcc/config/i386/x86-tune-sched-core.cc g++ -fno-PIE -c -g -O2 -DIN_GCC -fPIC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I../../gcc/../libcody -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc/../libbacktrace -o i386-options.o -MT i386-options.o -MMD -MP -MF ./.deps/i386-options.TPo ../../gcc/config/i386/i386-options.cc g++ -fno-PIE -c -g -O2 -DIN_GCC -fPIC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I../../gcc/../libcody -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc/../libbacktrace -o i386-builtins.o -MT i386-builtins.o -MMD -MP -MF ./.deps/i386-builtins.TPo ../../gcc/config/i386/i386-builtins.cc ../../gcc/analyzer/region-model-manager.cc: In instantiation of ‘void ana::log_uniq_map(ana::logger*, bool, const char*, const hash_map<K, T*>&) [with K = tree_node*; T = ana::constant_svalue]’: ../../gcc/analyzer/region-model-manager.cc:1626:16: required from here ../../gcc/analyzer/region-model-manager.cc:1576:27: warning: format ‘%li’ expects argument of type ‘long int’, but argument 4 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] 1576 | logger->log (" # %s: %li", title, uniq_map.elements ()); | ~~^ ~~~~~~~~~~~~~~~~~~~~ | | | | long int size_t {aka unsigned int} | %i ../../gcc/analyzer/region-model-manager.cc: In instantiation of ‘void ana::log_uniq_map(ana::logger*, bool, const char*, const hash_map<K, T*>&) [with K = tree_node*; T = ana::unknown_svalue]’: ../../gcc/analyzer/region-model-manager.cc:1627:16: required from here ../../gcc/analyzer/region-model-manager.cc:1576:27: warning: format ‘%li’ expects argument of type ‘long int’, but argument 4 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] 1576 | logger->log (" # %s: %li", title, uniq_map.elements ()); | ~~^ ~~~~~~~~~~~~~~~~~~~~ | | | | long int size_t {aka unsigned int} | %i ...
next reply other threads:[~2022-01-26 16:37 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-26 16:37 marxin at gcc dot gnu.org [this message] 2022-01-27 11:46 ` [Bug analyzer/104247] " cvs-commit at gcc dot gnu.org 2022-01-27 11:47 ` marxin at gcc dot gnu.org 2022-01-27 13:38 ` dmalcolm at gcc dot gnu.org 2022-02-03 4:38 ` egallager at gcc dot gnu.org 2022-02-03 8:43 ` marxin at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-104247-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).