[C++ PATCH] [PR 13005] Warn about casting of incomplete types

Stephen Ma stephenma@telus.net
Sat Jan 10 04:58:00 GMT 2004


On Fri, Jan 09, 2004 at 08:15:45PM +0000, neil at daikokuya dot co dot uk wrote:
> > +  /* Make -Wcast-incomplete effective in C++ only */
> > +  if (c_language != clk_cxx)
> > +    warn_cast_incomplete = 0;
> > +
> 
> This is unnecessary, given this:
> 
> > +Wcast-incomplete
> > +C++
> > +Warn about casting from/to incomplete types
> > +

Yes, the test is a bit of defensive programming and is redundant in a
couple of ways.  Perhaps I'm too paranoid for my own good; I will
remove it unless somebody objects.

Thanks for looking at the patch.



More information about the Gcc-patches mailing list