Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/abi/empty21.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
rev | line source |
---|---|
131 | 1 // PR c++/60336 |
2 // { dg-options "-Wabi=11" } | |
3 | |
4 #include <stdarg.h> | |
5 | |
6 struct A { }; | |
7 | |
8 void f(int i, ...) | |
9 { | |
10 va_list ap; | |
11 va_start (ap, i); | |
12 if (i >= 1) | |
13 va_arg (ap, A); | |
14 if (i >= 2) | |
15 va_arg (ap, int); | |
16 } | |
17 | |
18 int main() | |
19 { | |
20 f(0); | |
21 f(1, A()); // { dg-warning "ABI" "" { target { { i?86-*-* x86_64-*-* } && { ! { ia32 } } } } } | |
22 f(2, A(), 42); // { dg-warning "ABI" "" { target { { i?86-*-* x86_64-*-* } && { ! { ia32 } } } } } | |
23 } |