This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Re: More SJLJ exception breakage


Richard Guenther <richard.guenther@gmail.com> writes:

> On Tue, Apr 21, 2009 at 2:34 PM, Ulrich Weigand <uweigand@de.ibm.com> wrote:

>> However, I don't quite understand why the return label is bypassed
>> anyway; in the semantically identical situation where a "return;"
>> is the last statement of the function, the return_label is *not*
>> bypassed.

The return label is bypassed because the return label is for code which
copies the return value pseudo-register into the return hard register.
This is for cases like this:

int 
f(int i)
{
  if (i)
    my_exit_function();
  else
    return i;
}

Here let's assume that my_exit_function() does not have the noreturn
attribute and that the user is ignoring warnings about not returning a
value.  Without the naked return label the copy of the uninitialized
pseudo-register into the return register would trigger inappropriate
warnings and perhaps even break the old flow code.

It's entirely possible that these issues don't matter any more.  You do
need to confirm that code like the above does not issue an inappropriate
warning about an uninitialized value.  You may need to check that in a
few different languages.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]