Comment 2 for bug 898759

Revision history for this message
Jason Conti (jconti) wrote :

In oneiric you need to specify the libraries after the code due to changes in http://wiki.debian.org/ToolChain/DSOLinking

gcc test.c -lm

GCC also has builtin versions of sqrt which are folded in when the value of sqrt is a constant, so this is why you notice the differing behavior between variable and constant values. With the constant version compiling with:

gcc -fno-builtin -lm test.c

will give the same error.