This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap 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 translator/5023] problem setting variables or constants to 0x8000000000000000


------- 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.


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