Commit e964d9b2 by Jakub Jelinek Committed by Jakub Jelinek

re PR c/51628 (__attribute__((packed)) is unsafe in some cases (i.e. add…

re PR c/51628 (__attribute__((packed)) is unsafe in some cases (i.e. add -Waddress-of-packed-member, etc.))

	PR c/51628
	PR target/88682
	* c-c++-common/pr51628-10.c (unaligned_int128_t): Add
	may_alias attribute.

From-SVN: r267970
parent ee8045e5
2019-01-16 Jakub Jelinek <jakub@redhat.com>
PR c/51628
PR target/88682
* c-c++-common/pr51628-10.c (unaligned_int128_t): Add
may_alias attribute.
2019-01-15 Nikhil Benesch <nikhil.benesch@gmail.com> 2019-01-15 Nikhil Benesch <nikhil.benesch@gmail.com>
* gcc.misc-tests/godump-1.c: Add test case for typedef before * gcc.misc-tests/godump-1.c: Add test case for typedef before
......
...@@ -11,7 +11,7 @@ struct pair_t ...@@ -11,7 +11,7 @@ struct pair_t
typedef struct unaligned_int128_t_ typedef struct unaligned_int128_t_
{ {
__int128_t value; __int128_t value;
} __attribute__((packed)) unaligned_int128_t; } __attribute__((packed, may_alias)) unaligned_int128_t;
struct pair_t p = {0, 1}; struct pair_t p = {0, 1};
unaligned_int128_t *addr = (unaligned_int128_t *) &p.i; unaligned_int128_t *addr = (unaligned_int128_t *) &p.i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment