[cfe-dev] Incongruency in __builtin_constant_p with pointer argument

Joerg Sonnenberger joerg at britannica.bec.de
Wed Apr 27 15:06:00 PDT 2011


On Wed, Apr 27, 2011 at 11:30:50PM +0200, Abramo Bagnara wrote:
> I'm perfectly fine with the fact that clang treats const typed variable
> as evaluatable constant (although gcc don't), but this should be the
> same for both cases.

But a pointer to a global variable is not known at compile-time.
At such the behavior is completely correct and valid.

Joerg



More information about the cfe-dev mailing list