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

            Bug ID: 89812
           Summary: incorrect maximum in error: requested alignment
                    ‘536870912’ exceeds maximum 2147483648
           Product: gcc
           Version: 9.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: ---

The error below is justified but the value of the requested alignment (1 << 29,
or 536,870,912) does not exceed 2,147,483,648, or INT_MAX + 1U).

The maximum value looks like the result of a typo introduced in r265977
committed to fix bug 87795.

$ cat x.c && gcc -S x.c
typedef __attribute__ ((aligned (1U << 29))) char X;
x.c:1:1: error: requested alignment ‘536870912’ exceeds maximum 2147483648
    1 | typedef __attribute__ ((aligned (1U << 29))) char X;
      | ^~~~~~~

Reply via email to