Fix Tru64 UNIX Ada bootstrap

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Wed Aug 3 13:05:00 GMT 2011


Tru64 UNIX Ada bootstrap was broken, too:

/vol/gcc/src/hg/trunk/solaris/gcc/ada/init.c: In function 'void __gnat_error_handler(int, siginfo_t*, void*)':
/vol/gcc/src/hg/trunk/solaris/gcc/ada/init.c:382:50: error: cast from type 'const char*' to type 'char*' casts away qualifiers [-Werror=cast-qual]
cc1plus: all warnings being treated as errors

Fixed as follows, bootstrap is well beyond the failure now.

Ok for mainline?

	Rainer


2011-08-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
	CONST_CAST2.

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,8 @@ __gnat_error_handler (int sig, siginfo_t
     }
 
   recurse = 0;
-  Raise_From_Signal_Handler (exception, (char *) msg);
+  Raise_From_Signal_Handler (exception,
+			     CONST_CAST2 (char *, const char *, msg));
 }
 
 void

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University



More information about the Gcc-patches mailing list