[Bug middle-end/29078] wrong alignment with pragma pack(4)
dsiata at poczta dot onet dot pl
gcc-bugzilla@gcc.gnu.org
Thu Sep 14 10:46:00 GMT 2006
------- Comment #5 from dsiata at poczta dot onet dot pl 2006-09-14 10:46 -------
(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);
printf("D.a = %f\n", D.a);
return 0;
}
There is Bus Error in Init function...
--
dsiata at poczta dot onet dot pl changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|VERIFIED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29078
More information about the Gcc-bugs
mailing list