[cfe-commits] r63519 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/Sema/static-init.c

Eli Friedman eli.friedman at gmail.com
Mon Feb 2 15:21:02 PST 2009


On Mon, Feb 2, 2009 at 3:01 PM, Nuno Lopes <nunoplopes at sapo.pt> wrote:
>>> -      if (!Base)
>>> -        return CheckAddressConstantExpression(SubExpr);
>>> +      return Base ? false : CheckAddressConstantExpression(SubExpr);
>>>    }
>>
>> If you're going to add an ugly hack, please add a FIXME as well.
>
> pardon my ignorance, but why is that such a horrible hack? As far as I can
> tell it makes sense..

Because it allows stuff like the following?

int* f();
int a = (unsigned)f();

-Eli



More information about the cfe-commits mailing list