summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/enum13.C
blob: ec02d3bf60768febffe2eff197ec2a14d8aa3795 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/48780
// { dg-options "-std=c++0x -fabi-version=5 -Wabi" }

typedef __builtin_va_list __gnuc_va_list;
typedef __gnuc_va_list va_list;

enum struct A : short { X };

void foo(int x, ...) {
   va_list vl;
   __builtin_va_start(vl, x);
   enum A t = __builtin_va_arg(vl, enum A); // { dg-warning "promote" }
   __builtin_va_end(vl);
}

int main() {
   foo(0, A::X);		// { dg-warning "will not promote" }
}

// { dg-prune-output "note" }