[Bug middle-end/101799] Warning messages for PMF leak internal names like ::__pfn and ::__delta

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Aug 6 16:55:15 GMT 2021


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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
             Blocks|                            |24639
          Component|c++                         |middle-end
                 CC|                            |msebor at gcc dot gnu.org
     Ever confirmed|0                           |1
           Keywords|                            |diagnostic
   Last reconfirmed|                            |2021-08-06

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
The internal names are the ++ front end representation of member pointers as
seen in the dump below.  The pretty printer might be able to do a better job
formatting them (i.e., recognize it's a member pointer and print the name as it
appears in the source) but then we'd end up with a duplicate warning.  To avoid
that -Wuninitialized would also have to recognize member pointers and treat
them as special.  It might help to mark the internal names DECL_ARTIFICIAL.

bool f ()
{
  struct 
  {
    void S::<T36e> (struct S *) * __pfn;
    long int __delta;
  } mp;
  ...
  void S::<T36e> (struct S *) * _1;
  ...

  <bb 2> :
  # VUSE <.MEM_4(D)>
  _1 = mp.__pfn;   <<< -Wuninitialized


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639
[Bug 24639] [meta-bug] bug to track all Wuninitialized issues


More information about the Gcc-bugs mailing list