BUG#502: Do not let optimizing compilers think the symbol exists. Require the symbol by making the return value depend on it to force linking.
This commit is contained in:
parent
71b57bc454
commit
a8b2400f7b
|
@ -9,10 +9,8 @@ int main(){
|
||||||
#else
|
#else
|
||||||
int main(int ac, char*av[]){
|
int main(int ac, char*av[]){
|
||||||
#endif
|
#endif
|
||||||
int* p;
|
|
||||||
p = &CHECK_VARIABLE_EXISTS;
|
|
||||||
if(ac > 1000){return *av[0];}
|
if(ac > 1000){return *av[0];}
|
||||||
return 0;
|
return CHECK_VARIABLE_EXISTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CHECK_VARIABLE_EXISTS */
|
#else /* CHECK_VARIABLE_EXISTS */
|
||||||
|
|
Loading…
Reference in New Issue