http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54032

             Bug #: 54032
           Summary: The C compiler does not warn about casts to more
                    aligned types
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: enhancement
          Priority: P3
         Component: c
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: rgue...@gcc.gnu.org


struct Foo
{
  char c;
  int i;
} __attribute__((packed));

int *foo(struct Foo *p)
{
  return &p->i;
}

does not warn with -W -Wall -Wcast-align.

Reply via email to