[Bug c++/88166] Inconsistent placement of cv-quals and ptr-declarator in debuginfo

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Nov 23 13:32:00 GMT 2018


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-11-23
     Ever confirmed|0                           |1

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This isn't specific to lambdas, it happens for any local type:

struct Arg { char c; };

struct any
{
  template<typename T>
    struct Manager
    {
      static void manage(const any*, Arg*) { }
    };
};

struct global_type { };

int main()
{
  struct local_type { };
  auto f1 = &any::Manager<global_type>::manage;
  auto f2 = &any::Manager<local_type>::manage;
  return 0;
}

(gdb) p f1
$1 = (void (*)(const any *, Arg *)) 0x4004d1
<any::Manager<global_type>::manage(any const*, Arg*)>
(gdb) p f2
$2 = (void (*)(const any *, Arg *)) 0x4004c2
<any::Manager<main()::local_type>::manage(const any *, Arg *)>


More information about the Gcc-bugs mailing list