https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92032

            Bug ID: 92032
           Summary: DR 1601 - Promotion of enumeration with fixed
                    underlying type
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

The following should compile with this DR:

enum E : char { e };
int f(char);
void f(int);

void
g ()
{
  int k = f(e);
}

because [over.ics.rank]/4.2:
"A conversion that promotes an enumeration whose underlying type is fixed to
its underlying type is better than one that promotes to the promoted underlying
type, if the two are different."

Reply via email to