This is the mail archive of the gcc-patches@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] |
On Thu, Sep 1, 2011 at 5:19 PM, Jason Merrill<jason@redhat.com> wrote:I think it would make sense to expose this information to the back end somehow. A hook would do the trick: call it type_data_size or type_min_size or some such, which in the C++ front end would return TYPE_SIZE (CLASSTYPE_AS_BASE (t)) for classes or just TYPE_SIZE for other types.
That's too late to work with LTO, you'd need to store that information permanently somewhere.
Maybe move this whole C++ specific bitfield handling where it belongs, namely to the C++ frontend?
I suggest to always not re-use tail padding for now (I believe if your parent object is a COMPONENT_REF, thus, x.parent.bitfield, you can use the TYPE_SIZE vs. field-decl DECL_SIZE discrepancy to decide about whether the tail-padding was reused, but please double-check that ;)))
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |