summaryrefslogtreecommitdiff
path: root/scripts/gcc-plugins/structleak_plugin.c
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-12-02 16:49:29 +0300
committerKees Cook <keescook@chromium.org>2020-12-05 01:09:41 +0300
commitaf2d22254e8ee4558d3803372735c0b4f6046cd2 (patch)
treeb9644c9f4aaf14ec391b781fa37555800145986a /scripts/gcc-plugins/structleak_plugin.c
parentb65054597872ce3aefbc6a666385eabdf9e288da (diff)
downloadlinux-af2d22254e8ee4558d3803372735c0b4f6046cd2.tar.xz
gcc-plugins: remove code for GCC versions older than 4.9
Documentation/process/changes.rst says the minimal GCC version is 4.9. Hence, BUILDING_GCC_VERSION is greater than or equal to 4009. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20201202134929.99883-1-masahiroy@kernel.org
Diffstat (limited to 'scripts/gcc-plugins/structleak_plugin.c')
-rw-r--r--scripts/gcc-plugins/structleak_plugin.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/scripts/gcc-plugins/structleak_plugin.c b/scripts/gcc-plugins/structleak_plugin.c
index b9ef2e162107..29b480c33a8d 100644
--- a/scripts/gcc-plugins/structleak_plugin.c
+++ b/scripts/gcc-plugins/structleak_plugin.c
@@ -68,9 +68,7 @@ static void register_attributes(void *event_data, void *data)
{
user_attr.name = "user";
user_attr.handler = handle_user_attribute;
-#if BUILDING_GCC_VERSION >= 4007
user_attr.affects_type_identity = true;
-#endif
register_attribute(&user_attr);
}
@@ -137,11 +135,9 @@ static void initialize(tree var)
if (!gimple_assign_single_p(stmt))
continue;
rhs1 = gimple_assign_rhs1(stmt);
-#if BUILDING_GCC_VERSION >= 4007
/* ... of a non-clobbering expression... */
if (TREE_CLOBBER_P(rhs1))
continue;
-#endif
/* ... to our variable... */
if (gimple_get_lhs(stmt) != var)
continue;