[cfe-commits] r65381 - in /cfe/trunk: lib/CodeGen/CGExprConstant.cpp test/CodeGen/const-init.c
Daniel Dunbar
daniel at zuster.org
Tue Feb 24 14:29:52 PST 2009
On Tue, Feb 24, 2009 at 10:56 AM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Tue, Feb 24, 2009 at 10:41 AM, Daniel Dunbar <daniel at zuster.org> wrote:
>> + // We can never refer to a variable with local storage.
>> + if (!VD->hasLocalStorage()) {
>
> This should be an assertion, no?
C++, among other things. We want to "fail", not crash.
>> +// RUN: grep '@g18.p = internal global \[1 x i32\*\] \[i32\* @g19\]' %t &&
>> +// FIXME: Should we really accept this in Sema?
>
> Why shouldn't we accept it?
Because gcc, curiously, doesn't. I hate being more permissive than
gcc, but its inconsistent that gcc rejects it in this situation so I
think I prefer our behavior.
- Daniel
More information about the cfe-commits
mailing list