view gcc/testsuite/g++.old-deja/g++.brendan/enum3.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

// { dg-do assemble  }
// GROUPS passed enums
enum foo
{
  x = 0
};

enum bar
{
  // this used to say `x' wasn't a constant, because build_enumerator
  // was getting the value of x wrapped around a NOP_EXPR.  It now
  // strips them off before working on it, so we shouldn't get any
  // errors  for this.
  y = (x + 0x0000)
};