This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/29078] wrong alignment with pragma pack(4)
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Sep 2006 14:56:13 -0000
- Subject: [Bug middle-end/29078] wrong alignment with pragma pack(4)
- References: <bug-29078-13247@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from pinskia at gcc dot gnu dot org 2006-09-14 14:56 -------
(In reply to comment #5)
> (In reply to comment #3)
> And what with such example:
> #include <stdio.h>
> #pragma pack(4)
> struct ABC
> {
> double a;
> int b;
> bool c;
> };
> void Init(double& a)
> { a = 17.0; }
> int main()
> {
> ABC A;
> ABC B;
> int C;
> ABC D;
> printf("D.a = %f\n", D.a);
> Init(D.a);
Nope, this testcase is invalid as you are violating the alignment requirement
for double pointers.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29078