On Tue, Oct 11, 2011 at 10:32 AM, Joseph S. Myers <jos...@codesourcery.com> wrote:
> The problem comes down to an expression with the difference of two > pointers being cast to int on a 64-bit system, resulting in > convert_to_integer moving the conversions inside the subtraction. > (These optimizations at conversion time should really be done later as > a part of folding, or even later than that, rather than > unconditionally in convert_to_*, but that's another issue.) Interesting. C++11 classified this as "linktime" constants, e.g. they are constant expressions for static initialization purposes, but not compile-time constant expressions, precisely because of this kind of issues.