Re: Fix type of malloc call in trans-expr.cc
On Fri, Nov 15, 2024 at 07:45:32AM +, Paul Richard Thomas wrote: > Hi Jakub, Honza's catch. > Good catch! Does it fix any specific PR? Dunno. I think even without a PR it can be backported after a while. Jakub
Re: Fix type of malloc call in trans-expr.cc
> Hi Jakub, > > Good catch! Does it fix any specific PR? > > If you don't have the time, I would be happy to apply the correction to > 13-branch through to mainline. I caught it with my WIP patch to improve tree-ssa-dce. I am not aware it can produce wrong code. It will likely lead to missed optimization. I was wondering. We are very loose on type checking of calls because K&R C is evil. Perhaps we could have flag to enable more strict type checking for gimple produced by other languages. We would need to give up with LTO, but that is fine. I think bacporting the patch is fine. It is quite obvious fix. Honza