From owner-freebsd-hackers@FreeBSD.ORG Thu May 1 07:59:12 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0996037B405 for ; Thu, 1 May 2003 07:59:12 -0700 (PDT) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id E786C43FAF for ; Thu, 1 May 2003 07:59:10 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.8p1/8.12.3) with ESMTP id h41ExABp034136; Thu, 1 May 2003 07:59:10 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.8p1/8.12.3/Submit) id h41ExAD2034135; Thu, 1 May 2003 07:59:10 -0700 (PDT) (envelope-from rizzo) Date: Thu, 1 May 2003 07:59:09 -0700 From: Luigi Rizzo To: Dag-Erling Smorgrav Message-ID: <20030501075909.B33903@xorpc.icir.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from des@ofug.org on Thu, May 01, 2003 at 04:51:40PM +0200 cc: hackers@freebsd.org Subject: Re: incorrect enum warning? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2003 14:59:12 -0000 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"