This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C PATCH] warn for empty struct -Wc++-compat


On Sat, Nov 15, 2014 at 3:56 AM, Prathamesh Kulkarni
<bilbotheelffriend@gmail.com> wrote:
> On Sat, Nov 15, 2014 at 3:06 AM, Joseph Myers <joseph@codesourcery.com> wrote:
>> On Wed, 12 Nov 2014, Prathamesh Kulkarni wrote:
>>
>>> Is this version okay ?
>>> [gcc/c]
>>>   * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
>>>         Warn for empty struct.
>>>     (finish_struct): Pass TREE_CODE (t) and loc to
>>> warn_cxx_compat_finish_struct.
>>>
>>> [gcc/testsuite/gcc.dg]
>>>   * Wcxx-compat-22.c: New test-case.
>>
>> OK.
> Thanks. I will perform complete regression testing, and post the patch
>  with modifications to test cases that
> may possibly break due to this warning.
Sorry I had forgotten about this.
The attached patch adds warning for empty struct.
Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
OK for trunk ?

Thank you,
Prathamesh
>
> Regards,
> Prathamesh
>>
>> --
>> Joseph S. Myers
>> joseph@codesourcery.com

Attachment: ChangeLog.txt
Description: Text document

Attachment: empty-struct-warn.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]