public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16687] New: GDB Reports Incorrect Hexadecimal Value when adding floats
@ 2014-03-11 4:58 i.kerseymer at gmail dot com
2020-06-06 14:59 ` [Bug c++/16687] " tromey at sourceware dot org
0 siblings, 1 reply; 2+ messages in thread
From: i.kerseymer at gmail dot com @ 2014-03-11 4:58 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=16687
Bug ID: 16687
Summary: GDB Reports Incorrect Hexadecimal Value when adding
floats
Product: gdb
Version: 7.4
Status: NEW
Severity: normal
Priority: P2
Component: c++
Assignee: unassigned at sourceware dot org
Reporter: i.kerseymer at gmail dot com
Created attachment 7462
--> https://sourceware.org/bugzilla/attachment.cgi?id=7462&action=edit
Example
#include <stdio.h>
float value = 3.1415 + 299792458;
int main()
{
fprintf(stdout, "Value is %f\n", value);
return 0;
}
this program, when not compiled with -g flag reports "sum" as being ==
0x4d8ef3c2
with -g flag, it reports it as being == 0x11de7840
all you need to run is $ p/x value to see the behavior
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/16687] GDB Reports Incorrect Hexadecimal Value when adding floats
2014-03-11 4:58 [Bug c++/16687] New: GDB Reports Incorrect Hexadecimal Value when adding floats i.kerseymer at gmail dot com
@ 2020-06-06 14:59 ` tromey at sourceware dot org
0 siblings, 0 replies; 2+ messages in thread
From: tromey at sourceware dot org @ 2020-06-06 14:59 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=16687
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
CC| |tromey at sourceware dot org
Status|NEW |RESOLVED
--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
Without -g, you have to cast by hand.
With -g, /x does something expected for floats.
Marking this a dup.
*** This bug has been marked as a duplicate of bug 16242 ***
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-06 14:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-11 4:58 [Bug c++/16687] New: GDB Reports Incorrect Hexadecimal Value when adding floats i.kerseymer at gmail dot com
2020-06-06 14:59 ` [Bug c++/16687] " tromey at sourceware dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).