SDl 1.2.7, GCC 3.5 and Mac OS X causes segment fault (even in example prog)


SDL segment faults even in the sample programs when compiled with gcc 3.5
on Mac OS X (Tiger). Took me some time to figure out what was wrong.
The segment fault occured between applicationWillFinishLaunching and
applicationDidFinishLaunching in SDLMain.m (so initialization).
After checking whatever was initialized before [NSApp run] I noticed
some general windows/menu functions being called.

I am not sure but for some reason the last one (setupWindowMenu()) causes
the segment fault. Just commenting it out solves the segment fault.
setupWindowMenu does not contain much code, it simply creates a
Window menu with a Minimize menu item.

Since Tiger is not yet GM this might very well be fixed when it goes gold but
in the mean time, if someone wants to use SDL with GCC 3.5 with OS X they
need to comment out the one line (or someone needs to come with a better
correct fix).