17 lines · c
1// RUN: %clang_cc1 -fsyntax-only -verify=c2x -std=c2x %s2// RUN: %clang_cc1 -Wno-strict-prototypes -fsyntax-only -verify -std=c17 %s3// expected-no-diagnostics4 5// Functions with an identifier list are not supported in C23.6void ident_list(a) // c2x-error {{expected ';' after top level declarator}} \7 c2x-error {{unknown type name 'a'}}8 int a;9{} // c2x-error {{expected identifier or '('}}10 11// Functions with an empty parameter list are supported as though the function12// was declared with a parameter list of (void). Ensure they still parse.13void no_param_decl();14void no_param_defn() {}15void (*var_of_type_with_no_param)();16typedef void fn();17