inlining
Jeffrey Walton
noloader at gmail.com
Tue Feb 18 21:34:03 UTC 2014
On Tue, Feb 18, 2014 at 2:51 PM, atarob <nginx-forum at nginx.us> wrote:
> Pankaj Mehta Wrote:
> -------------------------------------------------------
>> These should be covered during the link time optimisations.
>>
>> Look here for gcc: http://gcc.gnu.org/wiki/LinkTimeOptimization
>
> I was very much unaware of this. The linker actually compiles..... Wow.
>
LTO also allows the linker to silently drop code with undefined
behavior. The compiler and linker are free to do what they want with
UB, including making demons fly out your nose [0].
So if the code includes, for example, signed integer overflow, then it
may result in incorrect results. The baffling thing will be when the
test suite passed earlier becuase the UB was not detected under the
test suite.
Jeff
[0] https://groups.google.com/forum/?hl=en#!msg/comp.std.c/ycpVKxTZkgw/S2hHdTbv4d8J
More information about the nginx
mailing list