Question for switch-case

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Question for switch-case

1,366件の閲覧回数
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
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 返信

289件の閲覧回数
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 件の賞賛
返信