On 2012-09-14 14:18:56 +0200, José Luis García Pallero wrote: > [...] Moreover, if I use the sqrt() function in the main() instad of > define the calc() function, I can use the -mieee-fp flag without > problems > > #include<stdio.h> > #include<math.h> > int main() > { > printf("Calc: %lf\n",sqrt(2.0)); > return 0; > } This difference is due to optimization: in this case, GCC evaluates sqrt(2.0) at compile time. So, no sqrt call is generated (this can be seen on the asm output with the -S option), and you won't get a library related error. -- Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)