On Thu, Sep 24, 2026 at 01:28:24PM +0200, Josef Melcr wrote:
> this patch cleans up two useless loops from the callback_only attribute
> handler.
>
> The first loop used to check for void_list_node, now it does
> literally nothing. Seems like I forgot to remove it when I changed the
> validation logic a few weeks ago.
>
> The second loop also checks for void_list_node and decrements type_nargs
> if it finds it, but since we ensure !stdarg_p for both the carrying and
> the callback function, looking for void_list_node again is pointless.
> In this case, we can just initialize type_nargs differently.
>
> Bootstrapped and regtested on x86_64-linux with no new regressions. OK
> for master?
>
> Best regards,
> Josef
>
> gcc/c-family/ChangeLog:
>
> * c-attribs.cc (handle_callback_only_attribute): Clean up old code.
LGTM.
Jakub