All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Remove noreturn function pointers in usage.c
@ 2011-06-08 21:43 Andi Kleen
  2011-06-08 21:43 ` [PATCH 2/2] Add profile feedback build to git Andi Kleen
  2011-06-09  0:36 ` [PATCH 1/2] Remove noreturn function pointers in usage.c Junio C Hamano
  0 siblings, 2 replies; 7+ messages in thread
From: Andi Kleen @ 2011-06-08 21:43 UTC (permalink / raw)
  To: git; +Cc: Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

Due to a bug in gcc 4.6+ it can crash when doing profile feedback
with a noreturn function pointer

(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49299)

Remove the NORETURNs from the die functions for now to work
around this. Doesn't seem to make any difference.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 usage.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/usage.c b/usage.c
index b5e67e3..4045574 100644
--- a/usage.c
+++ b/usage.c
@@ -12,13 +12,13 @@ void vreportf(const char *prefix, const char *err, va_list params)
 	fprintf(stderr, "%s%s\n", prefix, msg);
 }
 
-static NORETURN void usage_builtin(const char *err, va_list params)
+static  void usage_builtin(const char *err, va_list params)
 {
 	vreportf("usage: ", err, params);
 	exit(129);
 }
 
-static NORETURN void die_builtin(const char *err, va_list params)
+static  void die_builtin(const char *err, va_list params)
 {
 	vreportf("fatal: ", err, params);
 	exit(128);
@@ -36,8 +36,8 @@ static void warn_builtin(const char *warn, va_list params)
 
 /* If we are in a dlopen()ed .so write to a global variable would segfault
  * (ugh), so keep things static. */
-static NORETURN_PTR void (*usage_routine)(const char *err, va_list params) = usage_builtin;
-static NORETURN_PTR void (*die_routine)(const char *err, va_list params) = die_builtin;
+static void (*usage_routine)(const char *err, va_list params) = usage_builtin;
+static void (*die_routine)(const char *err, va_list params) = die_builtin;
 static void (*error_routine)(const char *err, va_list params) = error_builtin;
 static void (*warn_routine)(const char *err, va_list params) = warn_builtin;
 
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-06-09 21:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-08 21:43 [PATCH 1/2] Remove noreturn function pointers in usage.c Andi Kleen
2011-06-08 21:43 ` [PATCH 2/2] Add profile feedback build to git Andi Kleen
2011-06-09  0:36 ` [PATCH 1/2] Remove noreturn function pointers in usage.c Junio C Hamano
2011-06-09  4:59   ` Andi Kleen
2011-06-09  5:52     ` Jeff King
2011-06-09  6:31       ` Andi Kleen
2011-06-09 21:13         ` Erik Faye-Lund

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.