This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/55490] wrong function argument evalution ?


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55490

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|other                       |c
           Severity|blocker                     |normal

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-11-27 18:35:29 UTC ---
(Please don't change the component and priority back again)

Yes, you're wrong.

If you don't want to declare your functions properly then you need to convert
the argument type explicitly, otherwise the compiler assumes you want to pass
an eight byte double, then the function only looks at four of those bytes.

  test((int)floor(log(lng)));


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]