Re: [PATCH][gcc] Allow functions without C-style ellipsis to use format attribute

2021-07-04 Thread Tuan Le Quang via Gcc-patches
/* { dg-error "does not refer to a variable argument list" } */ ++ (void) alert: (const char *) my_format __attribute__ ((format (printf, 1, 2))); /* { dg-warning "exceeds the number of function parameters" } */ +- (void) alert: (const char *) my_format __attribute__ ((forma

[PATCH][gcc] Allow functions without C-style ellipsis to use format attribute

2021-06-27 Thread Tuan Le Quang via Gcc-patches
Hi, Currently, format attribute can be used to do type-checking for arguments with respect to a format string. However, only functions with a C-style ellipsis can use it. Supporting this attribute for non-variadic functions(functions without a C-style ellipsis) gives nice convenience especially w