From: SourceForge.net <no...@so...> - 2003-12-19 09:29:56
|
Bugs item #751682, was opened at 2003-06-09 21:16 Message generated for change (Comment added) made by epetrich You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=751682&group_id=599 Category: C-Front End >Group: fixed >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Erik Petrich (epetrich) Summary: Compile Error when trying to break out of while loop. Initial Comment: compile using: sdcc -c test.c message: error: 'breakStack' internal stack empty code: unsigned char a; unsigned char b; unsigned char c; unsigned char d; void uart_send(unsigned char *string) { a = 0; while( string[a]!=0); { if (b == c) { d = 1; break; } a++; } } ---------------------------------------------------------------------- >Comment By: Erik Petrich (epetrich) Date: 2003-12-19 03:29 Message: Logged In: YES user_id=635249 Fixed. See ChangeLog 1.539 for the relevant files updated. ---------------------------------------------------------------------- Comment By: Borut Razem (borutr) Date: 2003-06-15 14:39 Message: Logged In: YES user_id=568035 I think that this IS a bug: massages as 'breakStack' internal stack empty should be considered as compiler internal errors and are thrown by the stack handling routine as a fatal error. The complier should detect internal stack errors BEFORE the error actually happen (e.g. test if the stack is empty before pop-ing the value), report the error and continue with compilation, as is the case for other compile errors / warnings. So I'm reopening this bug in agreement with Jesus, who closed it. ---------------------------------------------------------------------- Comment By: Jesus Calvino-Fraga (jesusc) Date: 2003-06-09 21:28 Message: Logged In: YES user_id=603650 The problem is in your code. There is no place where to break to since you left a ';' after the while: while( string[a]!=0) { ... Jesus ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2003-06-09 21:17 Message: Logged In: NO m2s...@en... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=751682&group_id=599 |