17 lines · c
1// RUN: %clang_cc1 -verify -std=c2y -Wall -pedantic -Wpre-c2y-compat %s2// RUN: %clang_cc1 -verify=pre-c2y -std=c23 -Wall -pedantic %s3 4/* WG14 N3260: Clang 175 * Generic selection expression with a type operand6 */7 8static_assert(9 _Generic(10 const int, /* pre-c2y-warning {{passing a type argument as the first operand to '_Generic' is a C2y extension}}11 expected-warning {{passing a type argument as the first operand to '_Generic' is incompatible with C standards before C2y}}12 */13 int : 0,14 const int : 115 )16);17