From owner-freebsd-questions@FreeBSD.ORG Mon Jun 9 16:03:25 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 30A8837B401 for ; Mon, 9 Jun 2003 16:03:25 -0700 (PDT) Received: from perrin.int.nxad.com (internal.ext.nxad.com [69.1.70.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id C4A5843FBF for ; Mon, 9 Jun 2003 16:03:24 -0700 (PDT) (envelope-from sean@nxad.com) Received: by perrin.int.nxad.com (Postfix, from userid 1001) id 3C01220F01; Mon, 9 Jun 2003 16:03:24 -0700 (PDT) Date: Mon, 9 Jun 2003 16:03:24 -0700 From: Sean Chittenden To: questions@freebsd.org Message-ID: <20030609230324.GL65470@perrin.int.nxad.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-PGP-Key: finger seanc@FreeBSD.org X-PGP-Fingerprint: 3849 3760 1AFE 7B17 11A0 83A6 DD99 E31F BC84 B341 X-Web-Homepage: http://sean.chittenden.org/ User-Agent: Mutt/1.5.4i Subject: gcc me harder: -Wconversion bug? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2003 23:03:25 -0000 [ Please CC: me on replies, not on questions@ ] Is this a GCC bug with the -Wconversion flag or am I doing something wrong? I know it's just a warning, but it's irritating me more than that dumb Dan Quayle quote, "if it weren't for that horse, I wouldn't have spent an extra year in college..." -sc % gcc -v Using built-in specs. Configured with: FreeBSD/i386 system compiler Thread model: posix gcc version 3.2.2 [FreeBSD] 20030205 (release) % uname -a FreeBSD hostname.example.com 5.1-CURRENT FreeBSD 5.1-CURRENT #2: Mon Jun 9 12:23:34 PDT 2003 sean@hostname.example.com:/usr/src/sys/i386/compile/HOSTNAME i386 % gcc -Wconversion test.c test.c: In function `main': test.c:5: warning: passing arg 1 of `f' with different width due to prototype /* Begin test.h */ #ifndef __TEST_H__ #define __TEST_H__ #ifndef bool typedef char bool; #endif #ifndef true #define true ((bool)1) #endif #ifndef false #define false ((bool)0) #endif void f(bool b); #endif /* End test.h */ /* Begin test.c */ #include "test.h" int main(void) { f(true); return(0); } void f(bool b) { } /* End test.c */ -- Sean Chittenden