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
This commit is contained in:
committed by
Kees Cook
parent
b650545978
commit
af2d22254e
@@ -125,11 +125,7 @@ static tree handle_latent_entropy_attribute(tree *node, tree name,
|
||||
bool *no_add_attrs)
|
||||
{
|
||||
tree type;
|
||||
#if BUILDING_GCC_VERSION <= 4007
|
||||
VEC(constructor_elt, gc) *vals;
|
||||
#else
|
||||
vec<constructor_elt, va_gc> *vals;
|
||||
#endif
|
||||
|
||||
switch (TREE_CODE(*node)) {
|
||||
default:
|
||||
@@ -181,11 +177,7 @@ static tree handle_latent_entropy_attribute(tree *node, tree name,
|
||||
if (fld)
|
||||
break;
|
||||
|
||||
#if BUILDING_GCC_VERSION <= 4007
|
||||
vals = VEC_alloc(constructor_elt, gc, nelt);
|
||||
#else
|
||||
vec_alloc(vals, nelt);
|
||||
#endif
|
||||
|
||||
for (fld = lst; fld; fld = TREE_CHAIN(fld)) {
|
||||
tree random_const, fld_t = TREE_TYPE(fld);
|
||||
@@ -225,11 +217,7 @@ static tree handle_latent_entropy_attribute(tree *node, tree name,
|
||||
elt_size_int = TREE_INT_CST_LOW(elt_size);
|
||||
nelt = array_size_int / elt_size_int;
|
||||
|
||||
#if BUILDING_GCC_VERSION <= 4007
|
||||
vals = VEC_alloc(constructor_elt, gc, nelt);
|
||||
#else
|
||||
vec_alloc(vals, nelt);
|
||||
#endif
|
||||
|
||||
for (i = 0; i < nelt; i++) {
|
||||
tree cst = size_int(i);
|
||||
|
||||
Reference in New Issue
Block a user