Control going in both if and else

Hi all,

Has any one faced very strange behaviour on Solaris 10 OS using Sun studio C++ compiler 5.2, that control is going in both if as well as else.

I am not able to reproduce the issue stand alone its only happening in my big application.

Seems its related to some flags.

Update me if any one got this kind of strange issue.

[358 byte] By [sandeepkumargarga] at [2007-11-26 16:50:01]
# 1
HiCan you post a snippet?Are you sure there is no trailing semicolon, or something like that? Likeif (foo) bar();else; floop();Paul
Paul_Floyda at 2007-7-8 23:17:34 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
C++ 5.2 is not supported on Solaris 10.Please upgrade to Sun Studio 11, which is free. http://developers.sun.com/sunstudio/
clamage45a at 2007-7-8 23:17:34 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3

no statement is proper..I told the same code if i use in standalone application i.e using just that condition issue is not reproducable

thats some strange behaviour, now I got the same issue in another file of same library its going in lot of else if cases in random order.

Moreover i generated the assembly code of earlier simple if-else problem and compared wtih same code of SPARC there is no "jump" instruction at the end of execution of "if" part while assembly code of SPARC contains "jump" instruction''.

I am testing after installling sun studio 11.0 Lets see how it behaves now.

sandeepkumargarga at 2007-7-8 23:17:34 > top of Java-index,Development Tools,Solaris and Linux Development Tools...