[cfe-commits] r55607 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/Sema/array-init.c
Eli Friedman
eli.friedman at gmail.com
Mon Sep 1 16:02:31 PDT 2008
On Mon, Sep 1, 2008 at 3:39 PM, Neil Booth <neil at daikokuya.co.uk> wrote:
> Eli Friedman wrote:-
>
>> On Mon, Sep 1, 2008 at 2:22 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
>> >> +
>> >> +// ptrs are constant
>> >> +struct soft_segment_descriptor {
>> >> + int ssd_base;
>> >> +};
>> >> +static int dblfault_tss;
>> >> +
>> >> +union uniao { int ola; } xpto[1];
>> >> +
>> >> +struct soft_segment_descriptor gdt_segs[] = {
>> >> + {(int) &dblfault_tss},
>> >> + { (int)xpto},
>> >> +};
>> >
>> > Thank you for the testcase. However, the fix isn't correct. I'll file
>> > a bug momentarily for this issue, and I'll generally try to be
>> > responsive for issues like this.
>>
>> Actually, this testcase already passes with trunk clang... what
>> exactly is the patch trying to fix?
>
> Should this not be diagnosed in strict mode, if only as an implemented
> extension? Are you supporting this as an extension, or do you
> believe it's valid? I seems to violate 6.6p8; are you accepting
> it per 6.6p10?
I'm considering it as a missing diagnostic... I haven't really
considered how to structure the code to emit warnings correctly.
There are some changes to clang's constant handling in the works (the
tryEvaluate stuff), and this code is probably going to change
significantly once that's done.
-Eli
More information about the cfe-commits
mailing list