Hello, while trying to run sparse on the Wine sources I got a segfault which can be reproduced with following code:
int (*oink)() = (void *)0;
#0 0x0806243a in parameter_type_list (token=0xb7ff83bc, fn=0xb7feba2c, p=0x0)
at parse.c:1358
#1 0x08060fe7 in direct_declarator (token=0xb7ff83ac, decl=0xb7feb93c, p=0x0)
at parse.c:800
#2 0x08061145 in declarator (token=0x0, sym=0xb7feb93c, p=0xbfffeb0c)
at parse.c:849
#3 0x08062f55 in external_declaration (token=0xb7ff836c, list=0x8080400)
at parse.c:1652
#4 0x080632ae in translation_unit (token=0x0) at parse.c:1729
#5 0x0804e051 in sparse (argc=3, argv=0xbfffec54) at lib.c:518
#6 0x0804b03b in main (argc=3, argv=0xbfffec54) at check.c:267
p is set to NULL in direct_declarator().
Following code dosn't trigger the segfault:
int (*oink)();
int (*oink)(void) = (void *)0;
Although, i do not know if this is valid code (gcc compiles it without
complaining) but it triggers the segfault too:
int (*oink)(), (*muh)();
bye
michael
--
Michael Stefaniuc Tel.: +49-711-96437-199
Sr. Network Engineer Fax.: +49-711-96437-111
Red Hat GmbH Email: [EMAIL PROTECTED]
Hauptstaetterstr. 58 http://www.redhat.de/
D-70178 Stuttgart
pgpGPnoGZ9jWU.pgp
Description: PGP signature
