public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/29798] New: symtab.c doesn't compile with 32-bit GCC 12
@ 2022-11-17 14:54 ro at gcc dot gnu.org
  2022-11-17 14:57 ` [Bug build/29798] " ro at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ro at gcc dot gnu.org @ 2022-11-17 14:54 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29798

            Bug ID: 29798
           Summary: symtab.c doesn't compile with 32-bit GCC 12
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: ro at gcc dot gnu.org
  Target Milestone: 13.1

Compiling symtab.c with a 32-bit GCC 12 (12.2.0 on Solaris 11.4 in my case)
fails like this:

/vol/src/gnu/gdb/hg/master/local/gdb/symtab.c: In member function
‘std::vector<symbol_search> global_symbol_searcher::search() const’:
/vol/src/gnu/gdb/hg/master/local/gdb/symtab.c:4961:44: error: ‘std::sprintf’
may write a terminating nul past the end of the destination
[-Werror=format-overflow=]
 4961 |               sprintf (tmp, "operator%.*s%s", fix, " ", opname);
      |                                            ^
/vol/src/gnu/gdb/hg/master/local/gdb/symtab.c:4961:23: note: ‘std::sprintf’
output between 9 and 2147483648 bytes into a destination of size 2147483647
 4961 |               sprintf (tmp, "operator%.*s%s", fix, " ", opname);
      |               ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I'm uncertain how best to address this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2022-11-20 13:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-17 14:54 [Bug build/29798] New: symtab.c doesn't compile with 32-bit GCC 12 ro at gcc dot gnu.org
2022-11-17 14:57 ` [Bug build/29798] " ro at gcc dot gnu.org
2022-11-17 16:22 ` simon.marchi at polymtl dot ca
2022-11-18 15:48 ` cvs-commit at gcc dot gnu.org
2022-11-18 16:01 ` simark at simark dot ca
2022-11-20 13:53 ` cvs-commit 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).