This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: -Wold-style-cast and standard library macros
- From: Ian Lance Taylor <iant at google dot com>
- To: Yang Zhang <yanghatespam at gmail dot com>
- Cc: "John \(Eljay\) Love-Jensen" <eljay at adobe dot com>, GCC-help <gcc-help at gcc dot gnu dot org>
- Date: Tue, 24 Feb 2009 09:40:26 -0800
- Subject: Re: -Wold-style-cast and standard library macros
- References: <C5C86413.386C5%eljay@adobe.com> <49A322B4.9080808@gmail.com>
Yang Zhang <yanghatespam@gmail.com> writes:
> What I really intended to ask: is there any hope of seeing GCC not
> issue warnings for expansions of macros that were defined in a C
> standard library, such that users don't need to read through and
> re-define these C standard library macros?
I think that would be a useful feature. Unfortunately, it would be not
very easy to implement. But certainly I would encourage people to write
patches for this.
The approach more traditionally used by gcc is to fix the offending
constructs with the fixincludes scripts, to rewrite them such that they
do not cause warnings. That can be fairly difficult for avoiding C++
warnings, though.
Ian