Re: C++ PATCH for c++/67941 (UBsan error with empty lambda)

2015-11-25 Thread Jason Merrill
On 11/25/2015 02:21 PM, Jakub Jelinek wrote: Thanks. Though, perhaps we could guard those new two stmts with if (flag_sanitize & SANITIZE_UNDEFINED) ? No need to generate a useless attribute in the common case. OK, sure. commit 1c63a34b1d44cb6eb29e38c49660cb66c175c72b Author: Jason Merri

Re: C++ PATCH for c++/67941 (UBsan error with empty lambda)

2015-11-25 Thread Jakub Jelinek
On Wed, Nov 25, 2015 at 01:57:13PM -0500, Jason Merrill wrote: > The _FUN function returned by the lambda conversion operator calls the op() > with a null object argument, which would be undefined behavior for user > code, but we can get away with it internally since it isn't observable. > Tell UBs

C++ PATCH for c++/67941 (UBsan error with empty lambda)

2015-11-25 Thread Jason Merrill
The _FUN function returned by the lambda conversion operator calls the op() with a null object argument, which would be undefined behavior for user code, but we can get away with it internally since it isn't observable. Tell UBsan to ignore it. Tested x86_64-pc-linux-gnu, applying to trunk an