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/51628] __attribute__((packed)) is unsafe in some cases


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

--- Comment #31 from Sven <sven.koehler at gmail dot com> ---
https://gcc.gnu.org/viewcvs/gcc/trunk/?view=log&pathrev=251180

I am reading the commit message, and the example doesn't make any sense.
The aligned attribute is for providing additional alignment guarantees in
addition to the types default alignment. In particular, the documentation of
the aligned type attribute specifically states, that this attribute cannot
decrease alignment. It can only _increase_ alignment.

In particular, aligned(4) in combination with a 64bit type makes little sense.

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