0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-09-22 10:43:39 -04:00

If we have new features introduced by C11, use them

Instead of using hacks or compiler-specific features, if we have
standard features as defined in ISO C11, use them.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
H. Peter Anvin
2016-12-20 02:29:58 -08:00
parent fd610f27d6
commit abd28c9ab9
5 changed files with 44 additions and 5 deletions

View File

@@ -77,6 +77,7 @@
# include "nasmint.h"
#endif
#include <assert.h>
#include <stddef.h>
#include <stdarg.h>
#include <stdio.h>
@@ -208,7 +209,10 @@ char *strsep(char **, const char *);
/*
* How to tell the compiler that a function doesn't return
*/
#ifdef HAVE_FUNC_ATTRIBUTE_NORETURN
#ifdef HAVE_STDNORETURN_H
# include <stdnoreturn.h>
# define no_return noreturn void
#elif defined(HAVE_FUNC_ATTRIBUTE_NORETURN)
# define no_return void __attribute__((noreturn))
#else
# define no_return void