Date: Thu, 1 May 2003 07:59:09 -0700 From: Luigi Rizzo <rizzo@icir.org> To: Dag-Erling Smorgrav <des@ofug.org> Cc: hackers@freebsd.org Subject: Re: incorrect enum warning? Message-ID: <20030501075909.B33903@xorpc.icir.org> In-Reply-To: <xzp7k9a67pf.fsf@flood.ping.uio.no>; from des@ofug.org on Thu, May 01, 2003 at 04:51:40PM %2B0200 References: <xzp7k9a67pf.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 01, 2003 at 04:51:40PM +0200, Dag-Erling Smorgrav wrote: ... > PAM_SILENT = 0x80000000, ... > cause the following warning when compiled with CSTD=c99: > > /usr/src/contrib/openpam/include/security/pam_constants.h:100: warning: ISO C restricts enumerator values to range of `int' > > when 0x80000000 is clearly within the range of 'int' on all platforms > we support? maybe 0x80000000 gets interpreted as unsigned and then the compiler complains. E.g. in machine/limits.h you find #define INT_MIN (-0x7fffffff - 1) /* min value for an int */ (to tell the truth you also find there the following definition for UINT_MAX, and I don't understand why the 'U' is necessary then) #define UINT_MAX 0xffffffffU /* max value for an unsigned int */ cheers luigi > DES > -- > Dag-Erling Smorgrav - des@ofug.org > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030501075909.B33903>