View previous topic :: View next topic |
Author |
Message |
mecej4
Joined: 31 Oct 2006 Posts: 1886
|
Posted: Wed Dec 14, 2016 3:56 pm Post subject: SCC /64 gives spurious warning |
|
|
The 64-bit SCC V 3.78 compiler gives many false warnings for code containing if-then-else and switch statements.
Code: | #include <stdio.h>
int main(void){
int i,j;
i=11;
if(i > 5)j=3; else j=4;
if(i < 7)j=j*2;
printf("%d %d\n",i,j);
} |
Compile:
Quote: | s:\LANG>scc /64 cbug.c |
Compiler says:
Quote: | [Silverfrost SCC/WIN32 Ver 3.88 Copyright (c) Silverfrost Ltd 2016]
0006 if(i > 5)j=3; else j=4;
WARNING - This statement will never be executed
NO ERRORS, 1 WARNING [<CBUG> SCC/WIN32 Ver 3.88]
|
|
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1886
|
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Mon Dec 19, 2016 7:58 pm Post subject: |
|
|
20th Dec ... i.e. tomorrow ! |
|
Back to top |
|
|
|