Summary: | #pragma pack(1) context evaluated at point of instantiation rather than declaration | ||
---|---|---|---|
Product: | gcc | Reporter: | wuerkner |
Component: | c++ | Assignee: | Jason Merrill <jason> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | fonwin, gcc-bugs, igusarov, yuri, zhq |
Priority: | P3 | Keywords: | wrong-code |
Version: | 2.95.3 | ||
Target Milestone: | 4.5.0 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2007-10-04 01:50:24 | |
Attachments: | gcc_bug.tar.gz |
Description
wuerkner
2002-06-16 02:56:01 UTC
Fix: template instantiations should respect the #pragma pack-state of their definition. The current state when beeing instantiated should be irrelevant. State-Changed-From-To: open->analyzed State-Changed-Why: Confirmed. Not sure what the right answer is, but it would certainly be beneficial if the pragma-pack thing would be considered at the point of declaration, not at the point of instantiation -- just like an attribute attached to the type. Looks like we have a large number of these "top level" bugs where things apply at the top level when instantiating when they should not apply. *** Bug 10332 has been marked as a duplicate of this bug. *** *** Bug 16044 has been marked as a duplicate of this bug. *** *** Bug 21560 has been marked as a duplicate of this bug. *** *** Bug 34614 has been marked as a duplicate of this bug. *** Subject: Bug 7046 Author: jason Date: Fri Nov 6 03:33:17 2009 New Revision: 153959 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153959 Log: PR c++/7046 * class.c (finish_struct): Store maximum_field_alignment in TYPE_PRECISION. * pt.c (instantiate_class_template): Set maximum_field_alignment. Added: trunk/gcc/testsuite/g++.dg/abi/pragma-pack1.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/class.c trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog Fixed for 4.5. *** Bug 260998 has been marked as a duplicate of this bug. *** Seen from the domain http://volichat.com Page where seen: http://volichat.com/adult-chat-rooms Marked for reference. Resolved as fixed @bugzilla. |