From a8b2400f7b18f05791c4db2f46d9772410f19a2c Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 26 Apr 2004 10:19:44 -0400 Subject: [PATCH] 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. --- Modules/CheckVariableExists.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Modules/CheckVariableExists.c b/Modules/CheckVariableExists.c index 419c1b02e..752f6e486 100644 --- a/Modules/CheckVariableExists.c +++ b/Modules/CheckVariableExists.c @@ -9,10 +9,8 @@ int main(){ #else int main(int ac, char*av[]){ #endif - int* p; - p = &CHECK_VARIABLE_EXISTS; if(ac > 1000){return *av[0];} - return 0; + return CHECK_VARIABLE_EXISTS; } #else /* CHECK_VARIABLE_EXISTS */