| 1 |
// RUN: %clang_cc1 -std=c++98 %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors |
| 2 |
// RUN: %clang_cc1 -std=c++11 %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors |
| 3 |
// RUN: %clang_cc1 -std=c++14 %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors |
| 4 |
// RUN: %clang_cc1 -std=c++17 %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors |
| 5 |
// RUN: %clang_cc1 -std=c++20 %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors |
| 6 |
// RUN: %clang_cc1 -std=c++23 %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors |
| 7 |
// RUN: %clang_cc1 -std=c++2c %s -verify=expected -fexceptions -fcxx-exceptions -pedantic-errors |
| 8 |
|
| 9 |
// expected-no-diagnostics |
| 10 |
|
| 11 |
#include <stdarg.h> |
| 12 |
#include <stddef.h> |
| 13 |
namespace cwg273 { // cwg273: 2.7 |
| 14 |
struct A { |
| 15 |
int n; |
| 16 |
}; |
| 17 |
void operator&(A); |
| 18 |
void f(A a, ...) { |
| 19 |
offsetof(A, n); |
| 20 |
va_list val; |
| 21 |
va_start(val, a); |
| 22 |
va_end(val); |
| 23 |
} |
| 24 |
} // namespace cwg273 |