public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/104247] New: Compiler warnings on 32-bit system
@ 2022-01-26 16:37 marxin at gcc dot gnu.org
  2022-01-27 11:46 ` [Bug analyzer/104247] " cvs-commit at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-26 16:37 UTC (permalink / raw)
  To: gcc-bugs

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
...

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-02-03  8:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-26 16:37 [Bug analyzer/104247] New: Compiler warnings on 32-bit system marxin at gcc dot gnu.org
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

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).