https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127464
--- Comment #5 from Drea Pinski <pinskia at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #4) > It doesn't ICE in C either: > pr127464.c:2:5: error: type defaults to ‘int’ in declaration of > ‘__builtin_abort’ [-Wimplicit-int] > 2 | __builtin_abort (); > | ^~~~~~~~~~~~~~~ > pr127464.c:2:5: warning: ‘callback_only’ attribute argument 1 value ‘1’ > exceeds the number of function parameters 0 [-Wattributes] > pr127464.c:2:5: warning: ‘callback_only’ attribute argument 1 value ‘4’ > exceeds the number of function parameters 0 [-Wattributes] > pr127464.c:2:5: warning: conflicting types for built-in function > ‘__builtin_abort’; expected ‘void(void)’ [-Wbuiltin-declaration-mismatch] > pr127464.c:1:1: note: ‘__builtin_abort’ is declared in header ‘<stdlib.h>’ > +++ |+#include <stdlib.h> > 1 | [[gnu::callback_only(1, 2, 3), gnu::callback_only(4, 5)]] It does for pre c23, that is using -std=c11 .
