https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81871

            Bug ID: 81871
           Summary: bogus attribute alloc_align accepted
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

Similar to bug 78666, GCC accepts nonsensical attribute alloc_align specifiers
on functions where they have no meaning, such as on on functions that return
void or those that reference arguments of non-integer types.  They should
either be diagnosed with -Wattributes or rejected with an error.

$ cat a.c && gcc -O2 -S -Wall -Wextra -Wpedantic -Werror a.c
void __attribute__ ((alloc_align (1))) f (void*);

Reply via email to