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: [PATCH] Do not warn about C++ compatibility of casts to incomplete type


On Fri, Oct 29, 2010 at 10:50 AM, Paolo Bonzini <bonzini@gnu.org> wrote:
> While working on an unrelated patch I noticed a small imprecision
> in -Wc++-compat: casts to pointer to incomplete type are erroneously
> flagged as invalid in C++, if the occurrence of the incomplete type
> in the cast is also the first one in the translation unit.
>
> This patch fixes this imprecision. ?Adding a new bit means that
> not putting the entire spec.kind into struct c_declspecs is not
> cheaper anymore, so this patch does that as well.

Hi Paolo,

Hmm, I do not understand the purpose of the warning in the first
place.  I do not think there is any difference between C and C++
in this respect, so we should NOT be issueing the warning,

-- Gaby


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