This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Preliminary mainline patch for __attribute__ ((sentinel))
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: espie at nerim dot net
- Cc: gcc-patches at gcc dot gnu dot org, jsm at polyomino dot org dot uk
- Date: Tue, 14 Sep 2004 09:01:18 -0400 (EDT)
- Subject: Re: Preliminary mainline patch for __attribute__ ((sentinel))
- References: <200408281518.i7SFIFu9015822@caip.rutgers.edu> <Pine.LNX.4.61.0408281525140.4806@digraph.polyomino.org.uk> <200408281702.i7SH2q7O028876@caip.rutgers.edu> <Pine.LNX.4.61.0408281709070.5830@digraph.polyomino.org.uk> <200408281839.i7SIdV6A013866@caip.rutgers.edu> <20040914092843.GA9401@tetto.gentiane.org>
> I've finally restored OpenBSD-i386 to bootstrap land on mainline. It
> looks like you're wrong. The copy of fixinclude'd stddef.h I'm looking
> at does nothing of the sort.
That's strange, the stub patch against 3.3 you posted here:
http://gcc.gnu.org/ml/gcc/2004-08/msg01105.html
seems to only allow pointer zero...
In any case, what do you suggest we do now? I tried making this point
about integer NULL with Joseph for solaris2 and failed. Although it
seems more severe for openbsd since your stddef.h isn't suitable.
To fix this you can either:
1. Fix openbsd's stddef.h yourself
(but gcc-4.0 will still spuriously warn on older openbsds.)
2. Have GCC's fixincludes fix/replace your stddef.h as elsewhere.
3. Relax the check to accept integer NULL just for openbsd
(makes the warning less useful in Joseph's opinion)
4. Leave the warning as is, and fix all calls to concat in gcc
(other source code using sentinels will still have the problem.)
5. Something else?
If I had to pick, I lean towards #2. All of the other options have
some drawbacks (unless you can come up with a clean #5.)
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu