gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mframe.m and gcc 3.x


From: Nicola Pero
Subject: mframe.m and gcc 3.x
Date: Wed, 2 May 2001 14:30:06 +0100 (BST)

Apparently, the last missing bit in porting gnustep-base to run on newer
compilers (gcc-3.x) is mframe.m.  Once gnustep-base is done, all gnustep
should immediately work as well.

Currently, mframe.m crashes gcc 3.1.

More in detail, the following code in mframe_decode_return crashes the
compiler:

    case _C_ARY_B:
    case _C_STRUCT_B:
    case _C_UNION_B:
      {
        typedef struct {
          char  val[size];
        } block;
        inline block retframe_block(void *rframe)
        {
          __builtin_return (rframe);
        }
        *(block*)buffer = retframe_block(retframe);
        break;
      }

If you comment out this code, then gcc 3.1 compiles gnustep-base fine and
it works fine (as far as I tested, new problems could show up later).

I think it is a C problem - the code crashes the C compiler as well.  
Removing `inline' does not fix the problem.

I can't check the gcc bug database right now as their GNATS is down for a
software setup problem, but I think there is already a gcc bug report for
C showing a gcc crash on compiling a nested function returning a variable
size struct (which is a simplification of our case), but it has never been
fixed.  My idea is that when/if that was fixed, we could compile the whole
mframe.m again.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]