Re: gdb 8.x - g++ 7.x compatibility

Roman Popov <[email protected]>
Newsgroups gmane.comp.gdb.devel,gmane.comp.gcc.devel
Message-ID <CAATAM3GMG9q4JqPdMu2Qp-JsuBahdSUAV9PbMqCwtSG3k+p7mA@mail.gmail.com>
2018-02-02 20:54 GMT-08:00 Simon Marchi <[email protected]>:

>
> GCC changed how it outputs unsigned template parameters in the debug info
> (from 2u to just 2), and it doesn't look like it's going to change it
> back.  So I suppose we'll have to find a way to make GDB deal with it.
> Simon
>

I'm not so sure about it. In my opinion it is a gcc bug. 2u and 2 are
literals of different types. But I'm not a C++ expert.

It looks like g++ and clang treat C++ language differently in this case.
I've asked on stackoverflow:
https://stackoverflow.com/questions/48594693/auto-template-parameters-g-7-3-vs-clang-6-0-which-compiler-is-correct

If Clang is correct here, than foo<1u> and foo<1> are two different types.
And so gcc should emit correct postfixes to debuginfo.


-Roman
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.