------- Comment #3 from sebor at roguewave dot com 2007-03-14 19:04 ------- (In reply to comment #1) > Interesting. Do the attributes apply to derived classes automatically?
I would say no. > [...] > Is D also allowed to reorder members a and b? even with an explicit > __attribute__((reorder))? I'm afraid I don't know enough to give an informed answer but my gut tells me that it might be safer to have the programmer explicitly ask for the base class padding to be used to store members of the derived class (e.g., via some creative application of the attribute in the definition of the derived class) rather than having the compiler do it automatically for them. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31176