[Bug c/81871] bogus attribute alloc_align accepted
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jan 6 00:29:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81871
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |9.0
Known to fail| |8.2.0
--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
Looks like r266195 fixed it.
$ cat t.c && gcc -S t.c
void __attribute__ ((alloc_align (1))) f (int);
void* __attribute__ ((alloc_align (1))) g (void*);
t.c:1:1: warning: ‘alloc_align’ attribute ignored on a function returning
‘void’ [-Wattributes]
1 | void __attribute__ ((alloc_align (1))) f (int);
| ^~~~
t.c:3:1: warning: ‘alloc_align’ attribute argument value ‘1’ refers to
parameter type ‘void *’ [-Wattributes]
3 | void* __attribute__ ((alloc_align (1))) g (void*);
| ^~~~
It's being tested by gcc.dg/attr-alloc_align-4.c so the bug can be resolved.
Thanks for the reminder!
More information about the Gcc-bugs
mailing list