summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2018-02-25 22:25:57 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2018-02-25 22:25:57 +0300
commitdd6a2cdcf4a4bbd2c64fe0dbdcd3e0a2c8d63032 (patch)
treed0687fdfe92ea8b9f325cae0aadcb8c675129f85
parent72fd205bcf2bbe93792497b4cc91b88969743457 (diff)
downloadnasm-dd6a2cdcf4a4bbd2c64fe0dbdcd3e0a2c8d63032.tar.gz
Revert "compiler: Add fallthrough() helper"
This reverts commit 8ba28e13ea4453a587d08e5533e60f4ff2b4781a.
-rw-r--r--aclocal.m426
-rw-r--r--configure.ac5
-rw-r--r--include/compiler.h9
3 files changed, 0 insertions, 40 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 43649e70..36d36cf8 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -199,29 +199,3 @@ inline int foo(int x)
[Define to 1 if your compiler supports C99 extern inline])],
[AC_MSG_RESULT([no])
PA_ADD_CFLAGS([-fgnu89-inline])])])
-
-dnl --------------------------------------------------------------------------
-dnl PA_CHECK_FALLTHROUGH_ATTRIBUTE
-dnl --------------------------------------------------------------------------
-AC_DEFUN(PA_CHECK_FALLTHROUGH_ATTRIBUTE,
-[AC_MSG_CHECKING([if $CC supports fallthrough attribute])
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-AC_INCLUDES_DEFAULT
-int main(int argc, char **argv)
-{
- switch (argc) {
- case 1:
- (void)argc;
- __attribute__((fallthrough));
- default:
- (void)argv;
- break;
- }
- return argc;
-}
- ])],
- [AC_MSG_RESULT([yes])
- AC_DEFINE([HAVE_FALLTHROUGH_ATTRIBUTE], 1,
- [Define to 1 if your compiler supports __attribute__((fallthrough))])],
- [AC_MSG_RESULT([no])])
-])
diff --git a/configure.ac b/configure.ac
index 2f4d26fa..44c9e179 100644
--- a/configure.ac
+++ b/configure.ac
@@ -294,11 +294,6 @@ dnl options.
dnl
PA_CHECK_BAD_STDC_INLINE
-dnl Figure out if we can use fallthrough attribute or
-dnl should provide simple comment instead.
-dnl
-PA_CHECK_FALLTHROUGH_ATTRIBUTE
-
dnl
dnl support ccache
dnl
diff --git a/include/compiler.h b/include/compiler.h
index f4393518..fb146af4 100644
--- a/include/compiler.h
+++ b/include/compiler.h
@@ -241,15 +241,6 @@ size_t strnlen(const char *s, size_t maxlen);
#endif
/*
- * Fallthrough handling.
- */
-#ifdef HAVE_FALLTHROUGH_ATTRIBUTE
-# define fallthrough() __attribute__((fallthrough))
-#else
-# define fallthrough() /* fall through */
-#endif
-
-/*
* Hints to the compiler that a particular branch of code is more or
* less likely to be taken.
*/