Mercurial > projects > ldc
comparison dmd/lexer.c @ 1165:226c07c71967
This should fix integers below 64 bit on big-endian systems.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sun, 29 Mar 2009 01:29:30 +0100 |
parents | b30fe7e1dbb9 |
children | e961851fb8be |
comparison
equal
deleted
inserted
replaced
1164:166042b48c28 | 1165:226c07c71967 |
---|---|
116 | 116 |
117 p = buffer; | 117 p = buffer; |
118 switch (value) | 118 switch (value) |
119 { | 119 { |
120 case TOKint32v: | 120 case TOKint32v: |
121 #if IN_GCC | |
122 sprintf(buffer,"%d",(d_int32)int64value); | 121 sprintf(buffer,"%d",(d_int32)int64value); |
123 #else | |
124 sprintf(buffer,"%d",int32value); | |
125 #endif | |
126 break; | 122 break; |
127 | 123 |
128 case TOKuns32v: | 124 case TOKuns32v: |
129 case TOKcharv: | 125 case TOKcharv: |
130 case TOKwcharv: | 126 case TOKwcharv: |
131 case TOKdcharv: | 127 case TOKdcharv: |
132 #if IN_GCC | |
133 sprintf(buffer,"%uU",(d_uns32)uns64value); | 128 sprintf(buffer,"%uU",(d_uns32)uns64value); |
134 #else | |
135 sprintf(buffer,"%uU",uns32value); | |
136 #endif | |
137 break; | 129 break; |
138 | 130 |
139 case TOKint64v: | 131 case TOKint64v: |
140 sprintf(buffer,"%jdL",int64value); | 132 sprintf(buffer,"%jdL",int64value); |
141 break; | 133 break; |