From: Michael S. <msc...@ba...> - 2000-08-10 12:08:03
|
i thought, i had understud what the message x.c(998):warning *** conditional flow changed by optimizer 'x.c(542)':so said EVELYN the modified DOG ment, but now i think i knew nothing. i have a couple of nested statemachines that are implemented with switch-case statements. i have looked over and over the code, hacked and hacked, but i do not get rid of these messages. now, can anybody tell me what produces this messages and how i should rearrange my source ? or how i can find the reason for this message ? thanks. -- Dipl.-Ing. (FH) Michael Schmitt Baumer Ident GmbH Entwicklung / Development Department Hertzstr. 10 D-69469 Weinheim Deutschland / Germany Tel. +49 (0) 6201 9957 - 30 Fax. +49 (0) 6201 9957 - 99 E-Mail : msc...@ba... Web: http://www.baumerident.com |
From: Sandeep D. <sa...@dd...> - 2000-08-10 16:34:10
|
Michael This can happen if there is an empty default: case in the switch statement. Sandeep -----Original Message----- From: sdc...@li... [mailto:sdc...@li...]On Behalf Of Michael Schmitt Sent: Thursday, August 10, 2000 5:08 AM To: sdc...@li... Subject: [Sdcc-user] conditional flow .... i thought, i had understud what the message x.c(998):warning *** conditional flow changed by optimizer 'x.c(542)':so said EVELYN the modified DOG ment, but now i think i knew nothing. i have a couple of nested statemachines that are implemented with switch-case statements. i have looked over and over the code, hacked and hacked, but i do not get rid of these messages. now, can anybody tell me what produces this messages and how i should rearrange my source ? or how i can find the reason for this message ? thanks. -- Dipl.-Ing. (FH) Michael Schmitt Baumer Ident GmbH Entwicklung / Development Department Hertzstr. 10 D-69469 Weinheim Deutschland / Germany Tel. +49 (0) 6201 9957 - 30 Fax. +49 (0) 6201 9957 - 99 E-Mail : msc...@ba... Web: http://www.baumerident.com _______________________________________________ Sdcc-user mailing list Sdc...@li... http://lists.sourceforge.net/mailman/listinfo/sdcc-user |
From: Michael S. <msc...@ba...> - 2000-08-11 08:17:37
|
OK Sandeep, it happens if there is an empty default: case in a switch statement like case : stateXYZ break; or like default : break; i comment out those lines and some warnigs vanished away But not all ! The warning message contains the line number where the switch statement is, and the line number where the end bracket is. so far so good. but unfortunately not the line number where sdcc creates this warning. i searched between these two lines. case a1 : case a2 : do something break; case a3 : case a4 : do the same as above break; well, combining these does not help and produces not message; so, i have no empty default or case statement left. so investigated a bit more and ... case a1 : default : do something break; is the reason for the message. the case a1 is in my source an error-case. this state and every unknown state should be handled here. Well, if i change the source to //case a1: default : do something break; the effect will be the same as the state a1 (error) is handled anyway, as it is not one of all the other states and so it is like default. i hope this could help somebody else to understand why this message is created. Have a nice day ! Michael Schmitt Sandeep Dutta schrieb: > > Michael > > This can happen if there is an empty default: case in the > switch statement. > > Sandeep > > -----Original Message----- > From: sdc...@li... > [mailto:sdc...@li...]On Behalf Of Michael > Schmitt > Sent: Thursday, August 10, 2000 5:08 AM > To: sdc...@li... > Subject: [Sdcc-user] conditional flow .... > > i thought, i had understud what the message > x.c(998):warning *** conditional flow changed by optimizer 'x.c(542)':so > said EVELYN the modified DOG > ment, but now i think i knew nothing. > i have a couple of nested statemachines that are implemented with > switch-case statements. > i have looked over and over the code, hacked and hacked, but i do not > get rid of these messages. > > now, can anybody tell me what produces this messages and how i should > rearrange my source ? or how i can find the reason for this message ? > > thanks. > > -- > Dipl.-Ing. (FH) Michael Schmitt > Baumer Ident GmbH > Entwicklung / Development Department > Hertzstr. 10 > D-69469 Weinheim > Deutschland / Germany > Tel. +49 (0) 6201 9957 - 30 > Fax. +49 (0) 6201 9957 - 99 > E-Mail : msc...@ba... > Web: http://www.baumerident.com > > _______________________________________________ > Sdcc-user mailing list > Sdc...@li... > http://lists.sourceforge.net/mailman/listinfo/sdcc-user -- Dipl.-Ing. (FH) Michael Schmitt Baumer Ident GmbH Entwicklung / Development Department Hertzstr. 10 D-69469 Weinheim Deutschland / Germany Tel. +49 (0) 6201 9957 - 30 Fax. +49 (0) 6201 9957 - 99 E-Mail : msc...@ba... Web: http://www.baumerident.com |