Re: Allow IRIX Ada bootstrap with C++

2011-07-29 Thread Rainer Orth
Andreas, > Wouldn't it be cleanest to adjust the prototype of __gnat_error_handler > to reality, and cast it when assigning to sa_handler (not sa_sigaction, > which is only valid if SA_SIGINFO is set)? probably, provided g++ accepts that. I'd have to run two bootstraps (C and C++) to check this.

Re: Allow IRIX Ada bootstrap with C++

2011-07-28 Thread Andreas Schwab
Rainer Orth writes: > diff --git a/gcc/ada/init.c b/gcc/ada/init.c > --- a/gcc/ada/init.c > +++ b/gcc/ada/init.c > @@ -787,7 +787,11 @@ extern struct Exception_Data _abort_sign > static void > __gnat_error_handler (int sig, siginfo_t *reason, void *uc ATTRIBUTE_UNUSED) > { > - int code = reas

Re: Allow IRIX Ada bootstrap with C++

2011-07-28 Thread Arnaud Charlet
> Bootstrapped without regressions on mips-sgi-irix6.5, all signal > handling failures introduced by my previous patch are gone again. > > Ok for mainline? OK.

Re: Allow IRIX Ada bootstrap with C++

2011-07-28 Thread Rainer Orth
Eric Botcazou writes: >> That's what I did in my last patch, but without SA_SIGINFO set. This >> doesn't work since the additional args passed in the sa_handler case are >> not in any prototype, to g++ rightly complains (and this is an >> implementation detail I'd not rely upon if it can be avoi

Re: Allow IRIX Ada bootstrap with C++

2011-07-26 Thread Eric Botcazou
> It gets three *if SA_SIGINFO is set in act.sa_flags*, which is is not. That isn't what the comment says though: SA_SIGINFO [...] If cleared and the signal is caught, the first argument is also the signal number but the second argument is the signal code i

Re: Allow IRIX Ada bootstrap with C++

2011-07-26 Thread Rainer Orth
Eric Botcazou writes: >> gcc/ada/init.c (__gnat_install_handler) explicitly does not include >> SA_SIGINFO in sa_flags, which means the handler only gets one arg, sig. >> Still the installed handler (__gnat_error_handler) accesses args beyond >> the first. > > Why would it get only one arg? The

Re: Allow IRIX Ada bootstrap with C++

2011-07-25 Thread Eric Botcazou
> gcc/ada/init.c (__gnat_install_handler) explicitly does not include > SA_SIGINFO in sa_flags, which means the handler only gets one arg, sig. > Still the installed handler (__gnat_error_handler) accesses args beyond > the first. Why would it get only one arg? The comment explicitly says that it

Re: Allow IRIX Ada bootstrap with C++

2011-07-25 Thread Rainer Orth
Eric Botcazou writes: >> 2011-07-20 Rainer Orth >> >> * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation. >> Correct argument types. >> Extract code from reason. >> (__gnat_install_handler): Assign to act.sa_sigaction. > > This breaks signal handling on our

Re: Allow IRIX Ada bootstrap with C++

2011-07-23 Thread Eric Botcazou
> 2011-07-20 Rainer Orth > > * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation. > Correct argument types. > Extract code from reason. > (__gnat_install_handler): Assign to act.sa_sigaction. This breaks signal handling on our IRIX 6.5 machine though. --

Re: Allow IRIX Ada bootstrap with C++

2011-07-20 Thread Arnaud Charlet
> With this patch, bootstrap continued. Ok for mainline if it passes? OK, thanks. Arno

Allow IRIX Ada bootstrap with C++

2011-07-20 Thread Rainer Orth
A bootstrap on IRIX 6.5 only saw a single issue with C++ so far: ada/init.c failed to compile: /vol/gcc/src/hg/trunk/local/gcc/ada/init.c: In function 'void __gnat_install_handler()': /vol/gcc/src/hg/trunk/local/gcc/ada/init.c:862:20: error: invalid conversion from 'void (*)(int, int, sigcontext