Mercurial > hg > xemacs-beta
diff src/compiler.h @ 2268:61855263cb07
[xemacs-hg @ 2004-09-14 14:32:29 by james]
Identify functions that don't return, including some DEFUNs.
author | james |
---|---|
date | Tue, 14 Sep 2004 14:33:07 +0000 |
parents | 19b0fcab3f47 |
children | 0be6ff2356c8 |
line wrap: on
line diff
--- a/src/compiler.h Tue Sep 14 02:53:16 2004 +0000 +++ b/src/compiler.h Tue Sep 14 14:33:07 2004 +0000 @@ -110,24 +110,25 @@ # endif /* GNUC */ #endif -#ifndef DOESNT_RETURN +#ifndef DOESNT_RETURN_TYPE # if (GCC_VERSION > NEED_GCC (0, 0, 0)) # if (GCC_VERSION >= NEED_GCC (2, 5, 0)) -# if (GCC_VERSION < NEED_GCC (3, 0, 0)) - /* GCC 3.2 -O3 issues complaints in Fcommand_loop_1 about no return - statement if we have this definition */ -# define RETURN_NOT_REACHED(value) DO_NOTHING -# endif -# define DOESNT_RETURN void -# define DECLARE_DOESNT_RETURN(decl) void decl __attribute__ ((noreturn)) +# define RETURN_NOT_REACHED(value) DO_NOTHING +# define DOESNT_RETURN_TYPE(rettype) rettype +# define DECLARE_DOESNT_RETURN_TYPE(rettype,decl) rettype decl \ + __attribute__ ((noreturn)) # else /* GCC_VERSION < NEED_GCC (2, 5, 0) */ -# define DOESNT_RETURN void volatile -# define DECLARE_DOESNT_RETURN(decl) void volatile decl +# define DOESNT_RETURN_TYPE(rettype) rettype volatile +# define DECLARE_DOESNT_RETURN_TYPE(rettype,decl) rettype volatile decl # endif /* GCC_VERSION >= NEED_GCC (2, 5, 0) */ # else /* not gcc */ -# define DOESNT_RETURN void -# define DECLARE_DOESNT_RETURN(decl) void decl +# define DOESNT_RETURN_TYPE(rettype) rettype +# define DECLARE_DOESNT_RETURN_TYPE(rettype,decl) rettype decl # endif /* GCC_VERSION > NEED_GCC (0, 0, 0) */ +#endif /* DOESNT_RETURN_TYPE */ +#ifndef DOESNT_RETURN +# define DOESNT_RETURN DOESNT_RETURN_TYPE (void) +# define DECLARE_DOESNT_RETURN(decl) DECLARE_DOESNT_RETURN_TYPE (void, decl) #endif /* DOESNT_RETURN */ /* Another try to fix SunPro C compiler warnings */