Re: Compiler glitch
Re: Compiler glitch
- Subject: Re: Compiler glitch
- From: "Jan E. Schotsman" <email@hidden>
- Date: Sat, 4 Mar 2006 22:13:12 +0100
On 4-mrt-06, at 21:30, Chris Espinosa wrote:
The compiler invocation line would be helpful in diagnosing this, especially as it controls which dialect of C, which standard, and how strict the warnings are.
OK, this is the code:
void foo( SInt8 *x )
{
*x = 10;
}
void bar( void )
{
SInt8 x;
char y;
foo( &x );
foo( &y );
}
And this is the text output in the build window:
CompileC "build/.../CO Basic.c" normal ppc c com.apple.compilers.gcc.4_0
cd ...
/usr/bin/gcc-4.0 -x c -arch ppc -pipe -Wno-trigraphs -faltivec -g -O0 -Wmissing-prototypes -Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-parameter -Wunused-variable -Wunused-value -Wsign-compare -fmessage-length=0 -mtune=G5 -fvisibility=hidden -mmacosx-version-min=10.4
...
/CO Basic.c: In function 'bar':
.../CO Basic.c:1031: warning: pointer targets in passing argument 1 of 'foo' differ in signedness
Should be easy to reproduce.
In my answer to Justin I forgot about the "treat char as unsigned" setting but I wouldn't even consider changing the default.
Jan E.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden