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]

Re: Patch to fix i960 objc runtime build


>> + #define REAL_TYPE       _C_DBL
>
>OK, I give up.  How is this supposed to work?  REAL_TYPE as used in
>ROUND_TYPE_ALIGN is unrelated to the ObjC encoding char _C_DBL, at
>least as I understand the code.

The entire file is a hack.  It looks like objc has some kind of way to
create new types at run-time.  That requires a way to layout types at
runtime.  This was implemented by copying most of layout_type from
stor-layout.c into the objc runtime file encoding.c.  This includes various
macros that rely on gcc internals, such as ROUND_TYPE_ALIGN.  To make that
work, the file tries to map tree.h macros into the objc runtime equivalents.
The i960 port is failing here because it uses a bit of tree.h that isn't
already mapped to some objc runtime equivalent.

The whole approach looks risky to me.  A builtin function that calls into
the real layout_type function is probably a better solution.

Or maybe generalize the macros for type layout, so that it is easier
for libraries or other compilers to get the same type layout as gcc.

Jim


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]