This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Further tweak for PR ada/52123


Tested by Cesar on i686-pc-mingw32, applied on mainline and 4.7 branch.


2013-03-08  Cesar Strauss  <cestrauss@gmail.com>

	PR ada/52123
	* seh_init.c (Raise_From_Signal_Handler): Declare as no-return.
	(__gnat_SEH_error_handler): Likewise.  Remove final return.


-- 
Eric Botcazou
Index: seh_init.c
===================================================================
--- seh_init.c	(revision 196487)
+++ seh_init.c	(working copy)
@@ -6,7 +6,7 @@
  *                                                                          *
  *                          C Implementation File                           *
  *                                                                          *
- *           Copyright (C) 2005-2012, Free Software Foundation, Inc.        *
+ *           Copyright (C) 2005-2013, Free Software Foundation, Inc.        *
  *                                                                          *
  * GNAT is free software;  you can  redistribute it  and/or modify it under *
  * terms of the  GNU General Public License as published  by the Free Soft- *
@@ -60,7 +60,8 @@ extern struct Exception_Data _abort_sign
 
 #define Raise_From_Signal_Handler \
                       ada__exceptions__raise_from_signal_handler
-extern void Raise_From_Signal_Handler (struct Exception_Data *, const char *);
+extern void Raise_From_Signal_Handler (struct Exception_Data *, const char *)
+  ATTRIBUTE_NORETURN;
 
 
 #if defined (_WIN32)
@@ -72,7 +73,7 @@ extern void Raise_From_Signal_Handler (s
 extern void _global_unwind2 (void *);
 
 EXCEPTION_DISPOSITION __gnat_SEH_error_handler
-(struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*);
+(struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*) ATTRIBUTE_NORETURN;
 
 struct Exception_Data *
 __gnat_map_SEH (EXCEPTION_RECORD* ExceptionRecord, const char **msg);
@@ -198,7 +199,6 @@ __gnat_SEH_error_handler (struct _EXCEPT
 #endif
 
   Raise_From_Signal_Handler (exception, msg);
-  return 0; /* This is never reached, avoid compiler warning  */
 }
 #endif /* !(defined (_WIN64) && defined (__SEH__)) */
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]