public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94845] New: DWARF function name doesn't match demangled name in base type template parameters
@ 2020-04-29 11:03 robert at ocallahan dot org
  2020-04-29 11:29 ` [Bug c++/94845] " robert at ocallahan dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: robert at ocallahan dot org @ 2020-04-29 11:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94845

            Bug ID: 94845
           Summary: DWARF function name doesn't match demangled name in
                    base type template parameters
           Product: gcc
           Version: 9.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: robert at ocallahan dot org
  Target Milestone: ---

Example:

template <typename T> void func(T s) {}
int main(void) {
  func<short>(-1);
  return 0;
}

$ g++ -g -o ~/tmp/test ~/tmp/test.cc && objdump -g ~/tmp/test|grep func
    <2a>   DW_AT_name        : (indirect string, offset: 0x0): func<short int>
    <31>   DW_AT_linkage_name: (indirect string, offset: 0x10): _Z4funcIsEvT_
$ c++filt _Z4funcIsEvT_
void func<short>(short)

It's unclear why 'short int' appears instead of just 'short'. It would be
simpler if they were consistent (and, well, shorter). clang++ generates
'short'.

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

end of thread, other threads:[~2022-10-21 17:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29 11:03 [Bug c++/94845] New: DWARF function name doesn't match demangled name in base type template parameters robert at ocallahan dot org
2020-04-29 11:29 ` [Bug c++/94845] " robert at ocallahan dot org
2020-04-29 11:50 ` pinskia at gcc dot gnu.org
2020-04-29 11:52 ` pinskia at gcc dot gnu.org
2020-04-29 12:00 ` pinskia at gcc dot gnu.org
2020-04-29 12:19 ` robert at ocallahan dot org
2021-04-22 19:06 ` tromey at gcc dot gnu.org
2021-04-22 22:49 ` robert at ocallahan dot org
2021-04-23  1:38 ` tromey at gcc dot gnu.org
2021-04-23  2:27 ` robert at ocallahan dot org
2022-10-21 17:48 ` tromey 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).