[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Link Time Optimization vs __builtin_unreachable() and
From: |
Bob Paddock |
Subject: |
Re: [avr-gcc-list] Link Time Optimization vs __builtin_unreachable() and .signature? |
Date: |
Mon, 18 Jun 2012 15:53:16 -0400 |
>> With LTO all the code after __builtin_unreachable(); is gone, breaking
>> the project.
>
> Code after __builtin_unreachable() is unreachable, this not needed.
> If you claim a function is noreturn but there is a code path that can reach
> the end of such a function, your claim is obviously wrong, thus the warning.
>
> Note that the compiler has no knowledge on the magic of RST.CTRL.
> I don't know how the macro exactly expands, presumably it's just some
> inline assembler and SFR writes. This means that code execution resumes
> after the sequence, except you tell so. This is accomplished by
> __builtin_unreachable. It means "I never come here, any code after here
> is dead".
The issue is one of scope. I expect the reach of __unreachable() to
be limited to the __noreturn__ function or at least the file that it
is contained in.
With LTO all code after __unreachable() in *all* files linked after it
(guessing about 30) are gone. Does not seem correct.
- [avr-gcc-list] Link Time Optimization vs __builtin_unreachable() and .signature?, Bob Paddock, 2012/06/18
- Re: [avr-gcc-list] Link Time Optimization vs __builtin_unreachable() and .signature?, Weddington, Eric, 2012/06/18
- Re: [avr-gcc-list] Link Time Optimization vs __builtin_unreachable() and .signature?, Georg-Johann Lay, 2012/06/18
- Re: [avr-gcc-list] Link Time Optimization vs __builtin_unreachable() and .signature?,
Bob Paddock <=
- Re: [avr-gcc-list] Link Time Optimization vs __builtin_unreachable() and .signature?, Georg-Johann Lay, 2012/06/18
- Re: [avr-gcc-list] Link Time Optimization vs __builtin_unreachable() and .signature?, Bob Paddock, 2012/06/19
- Re: [avr-gcc-list] Link Time Optimization vs __builtin_unreachable() and .signature?, Georg-Johann Lay, 2012/06/21
- Re: [avr-gcc-list] Link Time Optimization vs __builtin_unreachable() and .signature?, Bob Paddock, 2012/06/26
- Re: [avr-gcc-list] Link Time Optimization vs __builtin_unreachable() and .signature?, Georg-Johann Lay, 2012/06/30
- Re: [avr-gcc-list] Link Time Optimization vs __builtin_unreachable() and .signature?, Bob Paddock, 2012/06/30