Closed GoogleCodeExporter closed 9 years ago
Sorry not bigger than 1<<30,
bigger than 1<<32-1
Original comment by huangjia...@gmail.com
on 4 Nov 2011 at 5:14
Some quick testing on my end shows that you need to be explicit with the values
you are passing in to the macro. For example:
EnvToInt64("some_env_var", 1ULL << 32)
Which correctly yields 4294967296. In your case the value being shifted is
implicitly being treated as a 32-bit integer.
Original comment by chapp...@gmail.com
on 4 Nov 2011 at 5:58
Does this address your concern? I couldn't find a use of EnvToInt64 in 1.8.3
that suffered from this issue.
Original comment by chapp...@gmail.com
on 4 Nov 2011 at 3:15
Comment #2 is right on here -- the problem is with '2<<31', which is not valid
C on systems where int is 32 bits. You need to cast the '2' to a type that is
wide enough to be shifted that much.
Original comment by csilv...@gmail.com
on 4 Nov 2011 at 7:23
Original issue reported on code.google.com by
huangjia...@gmail.com
on 4 Nov 2011 at 5:12