[PATCH][Ada] fix ada/24855

Laurent GUERBY laurent@guerby.net
Tue Nov 15 11:44:00 GMT 2005


On Tue, 2005-11-15 at 09:45 +0100, Arnaud Charlet wrote:
> > From Joel, needed to progress on building cross arm-rtems with Ada
> > enabled.
> > 
> > Ok to commit?
> 
> Not without more explanations. Where did you test this change ?
> Could you confirm that stdarg.h is guaranteed to be always available ?
> Also, the placement of the include seems incorrect to me. Finally,
> it would be good to give a small recap of what the problem is, so that
> people do not have to go back to the PR to get this info while reviewing
> your proposed change.

This is from Joel who tested it on arm-rtems (and possibly other
*-rtems). The PR has the compile time failure log. I will resubmit and
test on native x86-linux a patch with the include at the top of the
file.

As for why it's needed, my man page say that the include is necessary
in C99 to be able to use va_xxx, and raise.c does use the macro
but does not include directly stdarg.h.

<<
NAME
       stdarg - variable argument lists

SYNOPSIS
       #include <stdarg.h>

       void va_start(va_list ap, last);
       type va_arg(va_list ap, type);
       void va_end(va_list ap);
       void va_copy(va_list dest, va_list src);
...
CONFORMING TO
       The va_start, va_arg, and va_end macros conform to ANSI
X3.159-1989 (``C89'').  C99 defines the va_copy macro.
>>

I think since we require an ANSI C compiler, this should always be
available but I'm not a specialist of these issues.

> (Note that I have a change that will be done today which splits
> raise.c into raise.c and raise-gcc.c; your patch will apply to
> raise-gcc.c after my change).

Ok, thanks for the information.

Laurent




More information about the Gcc-patches mailing list