------- Comment #2 from rguenth at gcc dot gnu dot org  2010-09-02 13:08 -------
Confirmed.  This is EH lowering.

<bb 49>:
  finally_tmp.226 = 0;
  std::auto_ptr<YAMI::Message>::~auto_ptr (&msg);
  switch (finally_tmp.226) <default: <L60>, case 1: <L61>>

...

<L61>:
  return;

<L60>:
  return D.122655;

but the first return w/o value is introduced during GIMPLE lowering.

  std::auto_ptr<YAMI::Message>::auto_ptr (&msg, 0B);
  try
    {
...
    }
  finally
    {
      std::auto_ptr<YAMI::Message>::~auto_ptr (&msg);
    }
  goto <D.122659>;
...
  goto <D.122673>;
  <D.122659>:
  return;
  <D.122673>:
  return D.122655;


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|other                       |middle-end
     Ever Confirmed|0                           |1
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2010-09-02 13:08:56
               date|                            |
            Summary|bogus warning at -O0        |[4.5/4.6 Regression] bogus
                   |(control reaches end of non-|warning at -O0 (control
                   |void function).             |reaches end of non-void
                   |                            |function).
   Target Milestone|---                         |4.5.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45497

Reply via email to