This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Do not warn about C++ compatibility of casts to incomplete type
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: gcc-patches at gcc dot gnu dot org, Ian Lance Taylor <iant at google dot com>
- Date: Fri, 29 Oct 2010 11:00:58 -0500
- Subject: Re: [PATCH] Do not warn about C++ compatibility of casts to incomplete type
- References: <1288367432-3422-1-git-send-email-bonzini@gnu.org>
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