gcc me harder: -Wconversion bug?
Sean Chittenden
sean at chittenden.org
Mon Jun 9 16:03:25 PDT 2003
[ 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 at 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
More information about the freebsd-questions
mailing list