]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: remove dead code
authorMarek Polacek <polacek@redhat.com>
Fri, 15 May 2026 19:31:37 +0000 (15:31 -0400)
committerMarek Polacek <polacek@redhat.com>
Mon, 18 May 2026 21:46:50 +0000 (17:46 -0400)
We've had this comment to remove the code since r13-963, so it seems
it's been long enough now to go ahead and remove it.

gcc/cp/ChangeLog:

* constexpr.cc (cxx_eval_bare_aggregate): Remove dead code.

Reviewed-by: Jason Merrill <jason@redhat.com>
gcc/cp/constexpr.cc

index 1fc8a56503c622b425555add3f5256a5893284d1..701269cd3f60c60e125b23ebc5a2381831371bb4 100644 (file)
@@ -6883,15 +6883,6 @@ cxx_eval_bare_aggregate (const constexpr_ctx *ctx, tree t,
        /* This is an initializer for an empty field; now that we've
           checked that it's constant, we can ignore it.  */
        changed = true;
-      else if (index
-              && (TREE_CODE (index) == NOP_EXPR
-                  || TREE_CODE (index) == POINTER_PLUS_EXPR))
-       {
-         /* Old representation of empty bases.  FIXME remove.  */
-         gcc_checking_assert (false);
-         gcc_assert (is_empty_class (TREE_TYPE (TREE_TYPE (index))));
-         changed = true;
-       }
       else
        {
          if (TREE_CODE (type) == UNION_TYPE