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 middle-end/29078] wrong alignment with pragma pack(4)



------- 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


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