[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Sunday 29 February 2004 17:01, Eric Botcazou wrote:
> It seems to be stricter than GCC in default mode.
Yes, now that you mention it, I think I read that somewhere.
> Might be related to the __GNUC__ issue.
[...]
> From alconfig.h:
> #ifdef __GNUC__
> #ifndef ZERO_SIZE_ARRAY
> #if __GNUC__ < 3
> #define ZERO_SIZE_ARRAY(type, name) __extension__ type name[0]
> #else
> #define ZERO_SIZE_ARRAY(type, name) type name[] /* ISO C99
flexible
> array members */
> #endif
> #endif
> #endif
>
> #ifndef ZERO_SIZE_ARRAY
> #define ZERO_SIZE_ARRAY(type, name) type name[]
> #endif
ICC defines __GNUC__ as 3, so I guess this would not really matter.
I tried to rebuild the library with the -no-gcc switch and now the test
program crashes with a core dump. The stackframe traceback points to
draw_mouse():
#0 0x40288b71 in kill () from /lib/i686/libc.so.6
#1 0x4005ecf1 in pthread_kill () from /lib/i686/libpthread.so.0
#2 0x4005f00b in raise () from /lib/i686/libpthread.so.0
#3 0x40288904 in raise () from /lib/i686/libc.so.6
#4 0x40289e8c in abort () from /lib/i686/libc.so.6
#5 0x080ad04f in _xwin_signal_handler ()
#6 0x4006196c in __pthread_sighandler () from /lib/i686/libpthread.so.0
#7 <signal handler called>
#8 0x08088708 in draw_mouse ()
#9 0x000000c8 in ?? ()
Maybe it's due to pthreads and I should retry with sigalarm, but I'd rather
try to bypass the problem (if it's related to the ZERO_SIZE_ARRAY).
> Tests/test is the preferred Allegro benchmark.
Yup, it doesn't save all benchmarks to disk though...
> Fine. This should be the default.
Note that -no-gcc is not needed to compile Allegro itself, only programs
linked to it. I'll toy around with this some more. If it all works fine
otherwise, a remark in the docs is probably sufficient.
Evert