Re: C++ PATCH for c++/90473 - wrong code with nullptr in default argument

2019-08-13 Thread Jason Merrill
On 8/8/19 8:56 PM, Marek Polacek wrote: This is a wrong-code bug where we are throwing away the function call in the default argument here: void fn1 (void* p = (f(), nullptr)) { } and thus dropping the possible side-effects of that call to the floor. That happens because

C++ PATCH for c++/90473 - wrong code with nullptr in default argument

2019-08-08 Thread Marek Polacek
This is a wrong-code bug where we are throwing away the function call in the default argument here: void fn1 (void* p = (f(), nullptr)) { } and thus dropping the possible side-effects of that call to the floor. That happens because check_default_argument returns nullptr_node when it sees a