On Thu, Sep 24, 2026 at 11:48:16AM +0200, Josef Melcr wrote:
> gcc/ChangeLog:
> 
>       * doc/extend.texi: Add a sentence about unprototyped functions

This needs to be
        * doc/extend.texi (callback_only): ...

> --- /dev/null
> +++ b/gcc/testsuite/gcc.dg/pr127464.c
> @@ -0,0 +1,9 @@

Please add
/* PR c/127464 */
line here.

> +/* { dg-do compile } */
> +/* { dg-options "-std=c11 -Wattributes -Wno-implicit-int 
> -Wno-builtin-declaration-mismatch" } */
> +
> +[[gnu::callback_only(1, 2, 3), gnu::callback_only(4, 5)]]
> +__builtin_abort (); /* { dg-warning "requires a prototype" }*/

Please use here
void bar ();

instead, trying to redeclare a builtin (especially with implicit int
return) is a whole new level of brokeness, we really shouldn't put that
into tests unless we have to (and it very well can change at some point).

> +
> +[[gnu::callback_only(1, 2, 3)]]
> +void
> +foo (void (*) (), int *, double); /* { dg-warning "must have a prototype" } 
> */

Also unsure why the newline after void, for function declarations people
usually don't do that.

Otherwise LGTM.

        Jakub

Reply via email to