This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, fixincludes] Fix NULL on AIX
- From: Bruce Korb <bkorb at gnu dot org>
- To: David Edelsohn <dje dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Mike Stump <mikestump at comcast dot net>
- Date: Tue, 30 Apr 2013 10:09:36 -0700
- Subject: Re: [PATCH, fixincludes] Fix NULL on AIX
- References: <CAGWvny=3PiUFQQwNKpAxTX1G1tXB8HfoOUwkmRpvdi2WyKhAXg at mail dot gmail dot com> <CAKRnqNJGh8mWOPWNVveT1J43MvO+pePG2LDPO+yRHHHw1qXb8w at mail dot gmail dot com> <CAGWvnykUyapsTusRaKimsDkPET1zk9MSXtLCqxDyLbsMD68iTg at mail dot gmail dot com>
Hi,
On Tue, Apr 30, 2013 at 9:42 AM, David Edelsohn <dje.gcc@gmail.com> wrote:
> I coped c_fix_arg from openbsd_null_definition fix. I don't know if
> two different formats for similar fixes would be confusing, but I do
> not have a problem using the EOF version.
I haven't reviewed all patches and I don't always raise nits.
> Do you have any comment about the change to void_null fix?
By analogy, I'd prefer the EOF version there, too. But ultimately,
it works and is not exactly illegible, so I have no serious objection
to the fix. It would be nice if it were combinable, but doing so is
tricky. I'm guessing that the fix on AIX is separated because the
headers contain "__cplusplus" and that is used as an exclusion test
for the "void_null" fix? Otherwise this:
select = "^#[ \t]*define[ \t]+NULL[ \t]+("
"\\(\\(void[ \t]*\\*\\)0\\)" "|" "\\(*0L*\\)*" ")";
would allow void_null to work for you -- perhaps by using %1 somewhere
in the replacement "c-fix-arg".
Cheers - Bruce