Hi Jeff,
Jeff Trawick schrieb:
> (Perhaps non-suppressing Sun Studio users among the developers will
> notice when a new one crops up and evaluate whether or not it is a real
> problem; perhaps other compilers will warn in scenarios where it is more
> likely?)
/* test for "warning: statement not reached"
** compile with:
** gcc -Wall -Wunreachable-code -DTEST notreached.c -o notreached
*/
#include <stdio.h>
int main(void) {
#ifdef TEST
printf("Hello World\n");
return 0;
#endif
return 1;
}
# gcc -Wall -Wunreachable-code -DTEST notreached.c -o notreached
notreached.c: In function ‘main’:
notreached.c:12: warning: will never be executed
Gün.