Question for switch-case

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Question for switch-case

1,291 Views
james-lee
NXP Employee
NXP Employee
Hello,
 
I have one issue, may be due to compiler. If I have more code inside a "switch-case", then the control does not jump to end of "switch-case" after executing a "case" statement. It goes to some execption. Would you give me some adivce?
 
Best regards,
James
Labels (1)
0 Kudos
1 Reply

214 Views
CompilerGuru
NXP Employee
NXP Employee
I think we very probable need a bit more details here.
Which core are you using?
Which compiler?
With optimizations?
Can you show a compilable sample showing the problem?
Maybe a disassemble listing with the code and a comment how you expect it to be.

With the given info so far: Case entries in C do not jump to the end, you have to have a break. A missing break is a a common mistake.

But in the end: we need more info :smileyhappy:


0 Kudos