This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/5023] problem setting variables or constants to 0x8000000000000000
- From: "hunt at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 12 Sep 2007 13:19:35 -0000
- Subject: [Bug translator/5023] problem setting variables or constants to 0x8000000000000000
- References: <20070912130606.5023.hunt@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From hunt at redhat dot com 2007-09-12 13:19 -------
(In reply to comment #1)
> (FWIW, 0x8000blah is only a legal 64-bit number because we choose to accept either
> signed or unsigned 64-bit literals in the parser. They are all interpreted as
> signed afterwards.)
Yes. I'm thinking that the following patch should correct the problem and seems
to do so.
diff -u -p -r1.179 translate.cxx
--- translate.cxx 30 Aug 2007 20:23:50 -0000 1.179
+++ translate.cxx 12 Sep 2007 13:13:14 -0000
@@ -2863,7 +2863,7 @@ c_unparser::visit_literal_number (litera
// This looks ugly, but tries to be warning-free on 32- and 64-bit
// hosts.
// NB: this needs to be signed!
- o->line() << "((int64_t)" << e->value << "LL)";
+ o->line() << "((int64_t)" << e->value << "ULL)";
}
--
http://sourceware.org/bugzilla/show_bug.cgi?id=5023
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.