From: SourceForge.net <no...@so...> - 2006-02-17 04:22:57
|
Bugs item #1427663, was opened at 2006-02-08 08:15 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1427663&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: pic14 target Group: None Status: Open Resolution: None Priority: 5 Submitted By: Borut Razem (borutr) Assigned to: Nobody/Anonymous (nobody) Summary: SIGSEGV on static array of function pointers Initial Comment: 1 - sample code: <pre> ------------------------------------- void f(void) { } static void (*a[])(void) = { f, 0, }; void main(void) { void (**p)(void) = a; while (0 != *p) { (*p)(); ++p; } } ------------------------------------- </pre> 2 - SDCC command: $ sdcc -mpic14 -pp16f877 -c t.c 3 - sdcc version: $ sdcc -v SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.5.4 #1199 (Feb 7 2006) (MINGW32) 4 - error message: Caught signal 11: SIGSEGV If the keyword "static" is ommited in "static void (*a[])(void) = {", then the code compiles without errors, but the a array of function pointers is not initialized! Borut ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2006-02-16 20:22 Message: Logged In: NO I think this is a special case of the bug I've been experiencing - #1433337. - Zik Saleeba ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1427663&group_id=599 |