c/4152: Incorrect code for va_arg(x,char) and va_arg(x,short) on SH
Franz Sirl
Franz.Sirl-kernel@lauterbach.com
Wed Aug 29 01:54:00 GMT 2001
At 19:26 28.08.2001, Schirmer, Hartmut wrote:
> > C standards (C89 and later which have va_arg) specify that
> > anything passed
> > through '...' is fully promoted.
>
>Ok, thanks for that information.
>
> > I wonder how you could compile your code, cause I looked it up and in
> > gcc-2.96, gcc-3.0.x and gcc-3.1 it is an error (issued in
> > gcc/builtins.c),
> > not a warning. Are you sure you use a clean code base?
>
>I was just checking gcc 3.0.1 behaviour on this code
>since we had trouble with this error before.
>
>gcc -S gives me the .s file I reported
>gcc -c failes
>
>Is this ok?
>
>We usually do
> gcc -E src.c -o src.i
> gcc -S src.i -o src.s
> gcc -c src.s -o src.o
>in our script files. The gcc result isn't checked so
>we will continue with the incorrect .s file in this case.
Well, why don't you check the gcc exit status? gcc exits with a '1' exit
status for me and proper error checking (like make does) would catch that.
BTW, why don't you just use 'gcc -c src.c -save-temps' instead of the above?
Franz.
More information about the Gcc-bugs
mailing list