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] |
Hi all, here is another cleanup patch for OOP. It simply introduces the following macro in gfortran.h (as proposed by Paul): #define CLASS_DATA(sym) sym->ts.u.derived->components It often happens that we need to access the $data component of a class container, and the macro does exactly that ($data is the first component of the class container). I tried to apply the macro in all places where it's suitable and hope I forgot none. One place where the macro unfortunately cannot be applied for technical reasons is 'gfc_type_compatible' (still I made some modifications on this) and the beginning of 'resolve_fl_derived'. Paul, is this what you had in mind? Or are there more clever ways to do it? The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk? (With a ChangeLog, which I yet have to construct). Cheers, Janus
Attachment:
oop_cleanup_2.diff
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |