On May 2, 2009, at 5:03 PM, Eli Friedman wrote:

> On Sat, May 2, 2009 at 3:51 PM, Anders Carlsson <[email protected]>  
> wrote:
>>
>> 2 maj 2009 kl. 12.10 skrev Chris Lattner:
>>
>>> On May 2, 2009, at 10:45 AM, Anders Carlsson wrote:
>>>> URL: http://llvm.org/viewvc/llvm-project?rev=70634&view=rev
>>>> Log:
>>>> Downgrade the invalid offsetof error to a warning.
>>>
>>> Should the warning default to error?
>>>
>>
>> gcc 4.2 warns by default. Eli, what do you think?
>
> It'd be nice if we could detect the case where the struct isn't a POD
> only because it has a non-trivial constructor/destructor.

The C++0x notion of a "standard layout type" is probably what we would  
want here, and we'll have to support it eventually.

> We could
> then make that an extension warning (possibly off by default), and
> make the other cases errors by default.


In C++98, making it an extension warning for standard layout types  
would make sense.

        - Doug
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to