Re: [PATCH v2] c++: set loc on call even if result is discarded

2022-04-11 Thread Alexandre Oliva via Gcc-patches
On Apr 9, 2022, Jason Merrill wrote: >>> how about handling it in set_cleanup_locs instead? >> Like this? That seems reasonable to me. I'll give it a spin. > Yes, or perhaps STRIP_NOPS and set the location on whatever is left. > OK either way. Hmm, I'm not sure leaving the loc unset on the

Re: [PATCH] c++: set loc on call even if result is discarded

2022-04-08 Thread Jason Merrill via Gcc-patches
On 4/7/22 18:48, Alexandre Oliva wrote: On Apr 6, 2022, Jason Merrill wrote: On 4/6/22 15:37, Alexandre Oliva wrote: Need to adjust this subject line, as well. *nod*, thanks * tree.cc (protected_set_expr_location): Propagate locus to call wrapped in cast-to-void. I'm reluctant to put

Re: [PATCH] c++: set loc on call even if result is discarded

2022-04-08 Thread Richard Biener via Gcc-patches
On Fri, Apr 8, 2022 at 12:49 AM Alexandre Oliva via Gcc-patches wrote: > > On Apr 6, 2022, Jason Merrill wrote: > > > On 4/6/22 15:37, Alexandre Oliva wrote: > > Need to adjust this subject line, as well. > > *nod*, thanks > > >> * tree.cc (protected_set_expr_location): Propagate locus to > >>

Re: [PATCH] c++: set loc on call even if result is discarded

2022-04-07 Thread Alexandre Oliva via Gcc-patches
On Apr 6, 2022, Jason Merrill wrote: > On 4/6/22 15:37, Alexandre Oliva wrote: > Need to adjust this subject line, as well. *nod*, thanks >> * tree.cc (protected_set_expr_location): Propagate locus to >> call wrapped in cast-to-void. > I'm reluctant to put this C++-specific change in a

Re: set loc on call even if result is discarded

2022-04-06 Thread Jason Merrill via Gcc-patches
On 4/6/22 15:37, Alexandre Oliva wrote: Need to adjust this subject line, as well. This patch fixes a divergence in line numbers in diagnostics and, presumably, debug information, between targets whose cdtors return this and those that don't. The problem was visible in

set loc on call even if result is discarded

2022-04-06 Thread Alexandre Oliva via Gcc-patches
This patch fixes a divergence in line numbers in diagnostics and, presumably, debug information, between targets whose cdtors return this and those that don't. The problem was visible in g++.dg/cpp2a/constexpr-dtor3.C: while the dtor call in the cleanup for f4 was expected at the closing brace,