https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896
Thorsten Glaser <tg at mirbsd dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tg at mirbsd dot org
--- Comment #47 from Thorsten Glaser <tg at mirbsd dot org> ---
Regarding the proposed attribute: it would also be really great if I could do…
struct foo {
int type;
char name[] __attribute__((__element_count__(0)));
};
… to denote name[] is a NUL-terminated string.
This also allows, although not static, bounds checking for most of the use
cases not covered by a counting member (optionally multiplied by an extra
factor).