Skip to content

Commit

Permalink
compiler-gcc.h: drop checks for older GCC versions
Browse files Browse the repository at this point in the history
Now that GCC 5.1 is the minimally supported default, drop the values we
don't use.

Signed-off-by: Nick Desaulniers <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
nickdesaulniers authored and torvalds committed Sep 13, 2021
1 parent 156102f commit 4e59869
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions include/linux/compiler-gcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,8 @@

#if GCC_VERSION >= 70000
#define KASAN_ABI_VERSION 5
#elif GCC_VERSION >= 50000
#else
#define KASAN_ABI_VERSION 4
#elif GCC_VERSION >= 40902
#define KASAN_ABI_VERSION 3
#endif

#if __has_attribute(__no_sanitize_address__)
Expand Down
4 changes: 1 addition & 3 deletions tools/include/linux/compiler-gcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
# define __fallthrough __attribute__ ((fallthrough))
#endif

#if GCC_VERSION >= 40300
# define __compiletime_error(message) __attribute__((error(message)))
#endif /* GCC_VERSION >= 40300 */
#define __compiletime_error(message) __attribute__((error(message)))

/* &a[0] degrades to a pointer: a different type from an array */
#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
Expand Down

0 comments on commit 4e59869

Please sign in to comment.