Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Jun 2002 03:37:23 -0700
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Doug Barton <DougB@FreeBSD.ORG>, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/usr.sbin/inetd inetd.c
Message-ID:  <20020622033723.A12949@FreeBSD.ORG>
In-Reply-To: <20020622202821.P7645-100000@gamplex.bde.org>; from bde@zeta.org.au on Sat, Jun 22, 2002 at 08:38:38PM %2B1000
References:  <20020621195650.A29348@FreeBSD.ORG> <20020622202821.P7645-100000@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* Bruce Evans <bde@zeta.org.au> escriuréres
> > I seem to recall using at least one compiler that knew __typeof__ but not
> > typeof, not to mention that GCC seems to be ignorant that typeof() is a
> > builtin, but not __typeof__(), and therefore will emit bogus warnings.
> 
> I think gcc emits non-bogus warnings about typeof() because you asked it to
> by setting WARNS to >= 5 to make gcc more standard.  typeof() is just a
> function call in Standard C, so typeof(a) cannot possibly be part of a

Right, I realised this, but did't explain it right.  It has to treat it like
any function.

> declaration like it needs to be in the SWAP() macro.  Portable code would
> use __typeof__() inside a __GNUC__ ifdef for the gcc case and something
> else for the non-gcc case, or just something else in all cases.

Easy enough to do the latter.

Thanks.
-- 
Juli Mallett <jmallett@FreeBSD.org>       | FreeBSD: The Power To Serve
Will break world for fulltime employment. | finger jmallett@FreeBSD.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020622033723.A12949>