fa.netbsd.tech.kern
[Top] [All Lists]

Re: __dead functions

Subject: Re: __dead functions
From: Jason Thorpe <thorpej@xxxxxxxxxxxxxx>
Date: Fri, 18 Jul 2008 15:29:26 UTC
Newsgroups: fa.netbsd.tech.kern



On Jul 18, 2008, at 7:51 AM, Alexander Shishkin wrote:

/*
+ * Explicitly specify that a certain point in the codepath should not
+ * be reached and indicate so to gcc.
+ */
+#if __GNUC_PREREQ__(4, 3)
+#define __NOTREACHED for (;;) continue
+#else
+#define __NOTREACHED
+#endif


If it's truly not-reached code, how about

#define __NOTREACHED for (;;) panic("NOTREACHED %s:%u", __FILE__, __LINE__)

?

-- thorpej


<Prev in Thread] Current Thread [Next in Thread>