This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/32448] [3.3 / 3.4 / 4.1 / 4.2 / 4.3 Regression] abs / printf bug
- From: "rob1weld at aol dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jun 2007 04:21:50 -0000
- Subject: [Bug c/32448] [3.3 / 3.4 / 4.1 / 4.2 / 4.3 Regression] abs / printf bug
- References: <bug-32448-13830@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from rob1weld at aol dot com 2007-06-23 04:21 -------
(In reply to comment #9)
> Don't worry, it works correctly.
> ...
> Argument are pushed to the stack by the caller without any other
> communication with callee, so it is obvious that format string _must_
> reflect the type of values on stack.
> Also note, that %f inherently converts float type to double, so your values on
> the stack are FUBAR as far as printf is concerned.
That is "working correctly" ?!?
Very well, but not so obvious.
_IF_ we had "argflaps" (taken from the word "mudflaps") we could get printf (or
any other function) to type-check the variable on the stack (or anywhere!) at
run-time and compare it to what it "thought" it should be. This could be a very
powerful feature - but lack of it is not a bug :( .
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32448