Re: C++ PATCH for c++/91304 - prefix attributes ignored in condition

2019-08-22 Thread Jason Merrill
On Wed, Aug 21, 2019 at 7:24 AM Marek Polacek wrote: > > Currently, we disregard prefix attributes in conditions, e.g.: > > if ([[maybe_unused]] int i = f()) { } > > The problem here is that although we've parsed the attribute, it > was never passed down to start_decl, so the effects were lost.

C++ PATCH for c++/91304 - prefix attributes ignored in condition

2019-08-21 Thread Marek Polacek
Currently, we disregard prefix attributes in conditions, e.g.: if ([[maybe_unused]] int i = f()) { } The problem here is that although we've parsed the attribute, it was never passed down to start_decl, so the effects were lost. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2019-08-21