https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123858

--- Comment #5 from Jiang XueZhi <jiangxuezhi2 at huawei dot com> ---
(In reply to Harald van Dijk from comment #4)
> (In reply to Jiang XueZhi from comment #2)
> > I have a follow-up question: If a return type is cast from another type to
> > void, does this imply there is no ABI compatibility risk, and thus should
> > not trigger the -Wcast-function-type warning?
> 
> No, consider functions that return structures that are too large to fit in
> registers. They are handled by having the caller allocate memory for the
> return value and passing the pointer as a hidden argument. Taking away the
> information on the caller side that such a structure is returned means that
> the caller cannot ensure that memory is allocated for it.

Thank you for your reply.
  • [Bug c/123858] wcast-function-... jiangxuezhi2 at huawei dot com via Gcc-bugs

Reply via email to