This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/55490] wrong function argument evalution ?
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 27 Nov 2012 18:35:29 +0000
- Subject: [Bug c/55490] wrong function argument evalution ?
- Auto-submitted: auto-generated
- References: <bug-55490-4@http.gcc.gnu.org/bugzilla/>
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)));