/* Support for fully folding sub-trees of an expression for C compiler.
- Copyright (C) 1992-2018 Free Software Foundation, Inc.
+ Copyright (C) 1992-2020 Free Software Foundation, Inc.
This file is part of GCC.
&& (op1 = get_base_address (op0)) != NULL_TREE
&& INDIRECT_REF_P (op1)
&& TREE_CONSTANT (TREE_OPERAND (op1, 0)))
- ret = fold_convert_loc (loc, TREE_TYPE (expr), fold_offsetof_1 (op0));
+ ret = fold_offsetof (op0, TREE_TYPE (expr));
else if (op0 != orig_op0 || in_init)
ret = in_init
? fold_build1_initializer_loc (loc, code, TREE_TYPE (expr), op0)
}
return ret;
}
+
+/* Fold X for consideration by one of the warning functions when checking
+ whether an expression has a constant value. */
+
+tree
+fold_for_warn (tree x)
+{
+ /* The C front-end has already folded X appropriately. */
+ return x;
+}