joerg added a comment.

A simple case that still seems to fail:

  #include <inttypes.h>
  
  struct foo {
    uint32_t x;
    uint8_t y[2];
    uint16_t z;
  } __attribute__((__packed__));
  
  typedef struct foo __attribute__((__aligned__(16))) aligned_foo;
  
  int main(void) {
    struct foo x;
    struct foo __attribute__((__aligned__(4))) y;
    aligned_foo z;
  
    uint32_t *p32;
    p32 = &x.x;
    p32 = &y.x;
    p32 = &z.x;
  }

Only the first assignment to p32 should warn, the others are all correctly 
aligned.


https://reviews.llvm.org/D23657



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to