[cfe-commits] r143334 - in /cfe/trunk: lib/AST/ExprConstant.cpp test/SemaCXX/constant-expression-cxx11.cpp
eli.friedman at gmail.com
Mon Oct 31 14:16:56 PDT 2011
On Sun, Oct 30, 2011 at 10:11 PM, Richard Smith
<richard-llvm at metafoo.co.uk> wrote:
> Author: rsmith
> Date: Mon Oct 31 00:11:32 2011
> New Revision: 143334
> URL: http://llvm.org/viewvc/llvm-project?rev=143334&view=rev
> C++11 generalized constant expressions: evaluate equality comparisons between
> arbitrary pointers, if those pointers don't point to weak objects or literals.
This patch causes constructs like the following to be constant-folded:
extern char a;
bool b = (void *) a == (void *) 0x4000UL;
We don't really want to be doing that.
More information about the cfe-commits