This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: other/4957: #pragma pack(1) ... #pragma pack(4) does not restore the original alignment
- From: ljrittle at gcc dot gnu dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, igusarov at akella dot com, ljrittle at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 26 Mar 2003 09:55:05 -0000
- Subject: Re: other/4957: #pragma pack(1) ... #pragma pack(4) does not restore the original alignment
- Reply-to: ljrittle at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, igusarov at akella dot com, ljrittle at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: #pragma pack(1) ... #pragma pack(4) does not restore the original alignment
Responsible-Changed-From-To: unassigned->ljrittle
Responsible-Changed-By: ljrittle
Responsible-Changed-When: Wed Mar 26 09:55:05 2003
Responsible-Changed-Why:
Mine (only because posted from FreeBSD user).
State-Changed-From-To: open->closed
State-Changed-By: ljrittle
State-Changed-When: Wed Mar 26 09:55:05 2003
State-Changed-Why:
I am closing this report for the following reasons (please open a new
report, if you like after considering this feedback and overcoming the issues I found). (a) I can confirm that g++ 3.2.2 compiles your posted *.i the same way.
(b) g++ mainline can't even compile your posted *.i without error due to radical improvements in the template parser.
(c) you did a great job describing the large test case (and I'm sorry if no
one ever responded to you when you first posted it), however
it is still not clear to me that various one-definition rule (ODR) issues are properly considered. Even though you aren't linking the code together, ODR applies for things like this. Someone that is motivated
would have to sort out the test case. I attempted to build a small
self-contained test case based on your findings. However:
all my examples worked both with g++ 3.2 and mainline. This
is why I believe your case might violate ODR. OTOH, it is also possible
that your issue was related to template instantiation context botches.
Since that part of the compiler is now completely revamped, your code would have to be tested against it and as I noted, your preprocessed
code attachment no longer compiles.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4957