From b6927e08121d5ccd9ef061ec0c393a7e23220114 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 4 Dec 2011 09:01:28 -0800 Subject: Fix builds of lisp/core.c with Solaris Studio compilers Required in order to build with Studio cc now that xorg-macros is setting -errwarn=E_FUNC_HAS_NO_RETURN_STMT since a bug in the Solaris system headers causes the noreturn attribute to not be correctly applied to the exit() prototype in when building with Studio instead of gcc. Otherwise compiler exits with error: "lisp/core.c", line 4329: Function has no return statement : Lisp_Quit Uses Studio-specific pragma instead of adding another exit() prototype with a noreturn attribute to avoid causing gcc to warn about having a redundant prototype for the exit() function. Signed-off-by: Alan Coopersmith --- lisp/core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/core.c b/lisp/core.c index 89f5d5c..a9792e9 100644 --- a/lisp/core.c +++ b/lisp/core.c @@ -4308,6 +4308,11 @@ Lisp_Pushnew(LispBuiltin *builtin) return (result); } +#ifdef __SUNPRO_C +/* prevent "Function has no return statement" error for Lisp_Quit */ +#pragma does_not_return(exit) +#endif + LispObj * Lisp_Quit(LispBuiltin *builtin) /* -- cgit v1.2.3