Arnaud, >> Fixed as follows, bootstrap is well beyond the failure now. >> >> Ok for mainline? > > OK, thanks.
unfortunately, it turned out that this fix only works when compiling ada/init.c inside gcc, not for gnatlib where CONST_CAST* isn't defined. I need the following patch instead, which is also simpler for using CONST_CAST, not CONST_CAST2, and provides a CONST_CAST definition in tsystem.h, where it doesn't have to care about non-gcc compilers and older versions of gcc. alpha-dec-osf5.1b bootstrap has completed, make check currently running. Of for mainline if that passes? Thanks. Rainer 2011-08-03 Rainer Orth <r...@cebitec.uni-bielefeld.de> gcc: * tsystem.h (CONST_CAST2, CONST_CAST): Define. gcc/ada: * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use CONST_CAST. diff --git a/gcc/ada/init.c b/gcc/ada/init.c --- a/gcc/ada/init.c +++ b/gcc/ada/init.c @@ -379,7 +379,7 @@ __gnat_error_handler (int sig, siginfo_t } recurse = 0; - Raise_From_Signal_Handler (exception, (char *) msg); + Raise_From_Signal_Handler (exception, CONST_CAST (char *, msg)); } void diff --git a/gcc/tsystem.h b/gcc/tsystem.h --- a/gcc/tsystem.h +++ b/gcc/tsystem.h @@ -1,6 +1,7 @@ /* Get common system includes and various definitions and declarations based on target macros. - Copyright (C) 2000, 2001, 2004, 2005, 2009 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2004, 2005, 2009, 2011 + Free Software Foundation, Inc. This file is part of GCC. @@ -128,6 +129,9 @@ extern int errno; unreachable default case of a switch. Do not use gcc_assert(0). */ #define gcc_unreachable() (abort ()) +#define CONST_CAST2(TOTYPE,FROMTYPE,X) ((__extension__(union {FROMTYPE _q; TOTYPE _nq;})(X))._nq) +#define CONST_CAST(TYPE,X) CONST_CAST2(TYPE, const TYPE, (X)) + /* Filename handling macros. */ #include "filenames.h" -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University