Patchwork constant that doesn't fit in 32bits in alpha.c

login
register
mail settings
Submitter Richard Henderson
Date June 12, 2012, 1:05 a.m.
Message ID <4FD695E0.8040202@redhat.com>
Download mbox | patch
Permalink /patch/164294/
State New
Headers show

Comments

Richard Henderson - June 12, 2012, 1:05 a.m.
On 2012-06-11 16:23, Jay K wrote:
> Thank you. I like it. May I have another?
> 
> book2:gcc jay$ grep -i epoch vms*
> vmsdbgout.c:/* Difference in seconds between the VMS Epoch and the Unix Epoch */
> vmsdbgout.c:static const long long vms_epoch_offset = 3506716800ll;
> vmsdbgout.c:#define VMS_EPOCH_OFFSET 35067168000000000
> vmsdbgout.c:                        + VMS_EPOCH_OFFSET;
> 


In this case, long long is explicitly referenced in the surrounding code,
so I feel the safest change is just to add LL here.  I've cross-compiled
to alpha-dec-vms just to make sure, but I can't actually test this.


r~
* vmsdbgout.c (VMS_EPOCH_OFFSET): Add LL suffix.

Patch

diff --git a/gcc/vmsdbgout.c b/gcc/vmsdbgout.c
index 9689653..eedf1bd 100644
--- a/gcc/vmsdbgout.c
+++ b/gcc/vmsdbgout.c
@@ -1676,7 +1676,7 @@  to_vms_file_spec (char *filespec)
 }
 
 #else
-#define VMS_EPOCH_OFFSET 35067168000000000
+#define VMS_EPOCH_OFFSET 35067168000000000LL
 #define VMS_GRANULARITY_FACTOR 10000000
 #endif