This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/54032] New: The C compiler does not warn about casts to more aligned types


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: unassigned@gcc.gnu.org
        ReportedBy: rguenth@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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]