This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
RE: c/4152: Incorrect code for va_arg(x,char) and va_arg(x,short) on SH
- To: "Schirmer, Hartmut" <SchirmerH at Innovative-Systems dot de>
- Subject: RE: c/4152: Incorrect code for va_arg(x,char) and va_arg(x,short) on SH
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Date: Wed, 29 Aug 2001 10:53:49 +0200
- Cc: "Schirmer, Hartmut" <SchirmerH at Innovative-Systems dot de>,gcc-bugs at gcc dot gnu dot org
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.