Commit 96c891b3 by Rainer Orth Committed by Rainer Orth

tsystem.h (CONST_CAST2, CONST_CAST): Define.

	gcc:
	* tsystem.h (CONST_CAST2, CONST_CAST): Define.

	gcc/ada:
	* init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
	CONST_CAST.

From-SVN: r177427
parent 2aacf3c3
2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* tsystem.h (CONST_CAST2, CONST_CAST): Define.
2011-08-05 Ira Rosen <ira.rosen@linaro.org> 2011-08-05 Ira Rosen <ira.rosen@linaro.org>
* tree-vect-loop.c (vect_create_epilog_for_reduction): Use the * tree-vect-loop.c (vect_create_epilog_for_reduction): Use the
......
2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
CONST_CAST.
2011-08-04 Ed Schonberg <schonberg@adacore.com> 2011-08-04 Ed Schonberg <schonberg@adacore.com>
* sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
......
...@@ -379,7 +379,7 @@ __gnat_error_handler (int sig, siginfo_t *si, void *ucontext) ...@@ -379,7 +379,7 @@ __gnat_error_handler (int sig, siginfo_t *si, void *ucontext)
} }
recurse = 0; recurse = 0;
Raise_From_Signal_Handler (exception, (char *) msg); Raise_From_Signal_Handler (exception, CONST_CAST (char *, msg));
} }
void void
......
/* Get common system includes and various definitions and declarations /* Get common system includes and various definitions and declarations
based on target macros. 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. This file is part of GCC.
...@@ -128,6 +129,9 @@ extern int errno; ...@@ -128,6 +129,9 @@ extern int errno;
unreachable default case of a switch. Do not use gcc_assert(0). */ unreachable default case of a switch. Do not use gcc_assert(0). */
#define gcc_unreachable() (abort ()) #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. */ /* Filename handling macros. */
#include "filenames.h" #include "filenames.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment