Andy Ross wrote:
Erik Hofman wrote:
Ok, I've test compiled the simgear/nasal library using gcc on IRIX
and linked it with the MIPSpro build version of FlightGear and it's
working like a charm. Now remains the question, is it an exploited
gcc bug/feature or is it really a MIPSpro bug?
I've personally built and tested it using the Sun Studio compiler on
Sparc, and the windows builds are done using MSVC. That proves
nothing, of course, but if code were a democracy MIPSpro would be
losing 3:1. :)
Yeah, the only reason (if it isn't a bug) would be because I know for
certain that MIPSpro doesn't initialize pointers to NULL. I don't know
about other compilers.
Note that the naRef structure is a nested union, and the code makes
heavy use of structure assignment of these things. That's not a
common idiom (most other interpreters just use casts), so I wouldn't
be shocked if it triggered a bug or two. There's one spot in there
already (I forget who found it -- not me, anyway) with a workaround
for a gcc 2.95 code generation bug.
If you want to continue tracking this down, you could try starting
with a gcc library, and replace each .o file in turn with a MIPSpro
one to figure out where the faulty code generation is (it might be
more than one location, of course), then start moving code out
symbol-by-symbol until you zero in on the location. Then we can try
to rewrite it so it compiles correctly.
I plan on doing so, but not before the official 0.9.9 release.
Erik
_______________________________________________
Flightgear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d