Hi,
I have the following piece of code, and it seems ROMCC can't handle it (offcourse, gcc works):
struct bla{ struct bla* next_bla; }; int main(void){return 0;}
This is the error message I get while trying to compile it:
test.c test.c:2.27: struct bla undeclared
Any ideas on what could be done to get it work, if possible?
Regards, Cristi
Cristi Magherusan Cristi.Magherusan@net.utcluj.ro writes:
Hi,
I have the following piece of code, and it seems ROMCC can't handle it (offcourse, gcc works):
struct bla{ struct bla* next_bla; }; int main(void){return 0;}
This is the error message I get while trying to compile it:
test.c test.c:2.27: struct bla undeclared
Any ideas on what could be done to get it work, if possible?
That does sound like a bug.
What are you aiming at doing with a linked-list in romcc compiled code? To the best of my knowledge linked lists in static constant data structures aren't particularly useful. Or is this just from a header you want to share with romcc code and gcc compiled code and this structure just happens to be in there. I'm asking because I get the sense that you are trying to do something that has easier solutions than to fix romcc.
Eric
On Thu, 2010-08-12 at 16:05 -0700, Eric W. Biederman wrote:
Cristi Magherusan Cristi.Magherusan@net.utcluj.ro writes:
Hi,
I have the following piece of code, and it seems ROMCC can't handle it (offcourse, gcc works):
struct bla{ struct bla* next_bla; }; int main(void){return 0;}
This is the error message I get while trying to compile it:
test.c test.c:2.27: struct bla undeclared
Any ideas on what could be done to get it work, if possible?
That does sound like a bug.
What are you aiming at doing with a linked-list in romcc compiled code? To the best of my knowledge linked lists in static constant data structures aren't particularly useful. Or is this just from a header you want to share with romcc code and gcc compiled code and this structure just happens to be in there.
Yes, actually I'm trying to port ruik's netconsole code to SeaBIOS, and it seems to need some of the PCI-related headers that define such data structures. still, I might not even need those, since SeaBIOS already defines some PCI functions that could be used instead of those PCI headers I tried to port from coreboot.
I'm asking because I get the sense that you are trying to do something that has easier solutions than to fix romcc.
Eric
Thanks, Cristi
On Sat, 2010-08-14 at 12:49 +0300, Cristi Magherusan wrote:
On Thu, 2010-08-12 at 16:05 -0700, Eric W. Biederman wrote:
Cristi Magherusan Cristi.Magherusan@net.utcluj.ro writes:
Hi,
I have the following piece of code, and it seems ROMCC can't handle it (offcourse, gcc works):
struct bla{ struct bla* next_bla; }; int main(void){return 0;}
This is the error message I get while trying to compile it:
test.c test.c:2.27: struct bla undeclared
Any ideas on what could be done to get it work, if possible?
That does sound like a bug.
What are you aiming at doing with a linked-list in romcc compiled code? To the best of my knowledge linked lists in static constant data structures aren't particularly useful. Or is this just from a header you want to share with romcc code and gcc compiled code and this structure just happens to be in there.
Yes, actually I'm trying to port ruik's netconsole code to SeaBIOS,
Sorry, I'm talking about SerialICE not SeaBIOS.
Am 13.08.2010 00:48, schrieb Cristi Magherusan:
Any ideas on what could be done to get it work, if possible?
Not sure if that can work at all. romcc attempts to stuff all living variables into registers, and this could (in theory) create a loop.
romcc is really only for limited scenarios, and in my opinion, linked lists exceed its scope.
Patrick