GCC complains about nested functions despite none being present

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

 



This question is in context of my own custom target for GCC. I just
want the compiler to be able to emit assembly for arbitrary C code, no
libraries.

I am currently in the state where I have a very minimal but compile-able
back-end complete.

However, I recieve the following error when trying to compile a minimal
C program:

test.c: In function 'main':
test.c:4:1: sorry, unimplemented: nested functions not supported on this
target
 }
 ^

The test.c file:

int main() {
    int a;
}

compiled with:
./xgcc -B $XGCCDIR -O0 -nostdlib -ffreestanding -nostartfiles -S -o a.S test.c

where $XGCCDIR is used to let xgcc locate cc1.

Clearly I have no nested functions. I am wondering as to whether this
is perhaps due to incomplete knowledge of how to perform stack
operations: I thought of catching the compiler execution as follows:

void lnx1_expand_prologue() {
    gcc_unreachable();
}

void lnx1_expand_epilogue() {
    gcc_unreachable();
}

But is seems that these functions don't get called at any point.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux