Re: [PATCH RFA(pointer-query)] c++: -Wplacement-new and anon union member [PR100370]

2022-04-11 Thread Richard Biener via Gcc-patches
On Wed, Apr 6, 2022 at 4:26 PM Jason Merrill via Gcc-patches wrote: > > This bug was an object/value confusion; we are interested in the size > of *b.ip, but instead the code was calculating the size of b.ip itself. > > This seems to be because compute_objsize will compute the size of whatever >

[PATCH RFA(pointer-query)] c++: -Wplacement-new and anon union member [PR100370]

2022-04-06 Thread Jason Merrill via Gcc-patches
This bug was an object/value confusion; we are interested in the size of *b.ip, but instead the code was calculating the size of b.ip itself. This seems to be because compute_objsize will compute the size of whatever object it can find in the argument: if you pass it a VAR_DECL, it gives you the