summaryrefslogtreecommitdiff
path: root/mcon/U/Csym.U
diff options
context:
space:
mode:
Diffstat (limited to 'mcon/U/Csym.U')
-rw-r--r--mcon/U/Csym.U14
1 files changed, 12 insertions, 2 deletions
diff --git a/mcon/U/Csym.U b/mcon/U/Csym.U
index e7c7c4b..ff944ea 100644
--- a/mcon/U/Csym.U
+++ b/mcon/U/Csym.U
@@ -79,9 +79,19 @@ yes)
?X:
?X: Lastly, gcc 3.4 otimizes &missing == 0 away, so we use + 2 instead now.
?X: The GNU folks like to do weird things, don't they? -- RAM, 2004-06-05
+?X
+?X: The above was invalid because main returns an int not a pointer.
+?X: Using != or == does not work because GCC complains the pointer will
+?X: never be NULL if the function exists. It is a warning meant to prevent
+?X: using an address of a function by accident instead of calling it.
+?X: However, &missing > 0 is indeed silently optimized away.
+?X
+?X: FIXME: There must be a test whether non-existing functions are found!
?X:
- echo "extern char $1$tdc; int main() { return &$1$tc + 2; }" > t.c;
- if $cc $ccflags $ldflags -o t t.c $libs >/dev/null 2>&1;
+?X:. -- cbiere, 2011-01-18
+?X:
+ echo "extern char $1$tdc; int main(void) { return (unsigned long) &$1$tc > 2; }" > t.c;
+ if $cc $ccflags $ldflags -o t t.c $libs;
then tval=true;
else tval=false;
fi;