brintos

brintos / llvm-project-archived public Read only

0
0
Text · 811 B · ae5c140 Raw
32 lines · c
1// RUN: %clang_cc1 -Wall -Wno-unused -Wno-uninitialized -verify -std=c17 %s2// RUN: %clang_cc1 -Wall -Wno-unused -Wno-uninitialized -verify -std=c23 %s3 4#define CFI_UNCHECKED_CALLEE __attribute__((cfi_unchecked_callee))5 6#if __STDC_VERSION__ >= 202311L7// expected-no-diagnostics8#endif9 10#if __STDC_VERSION__ < 202311L11// expected-note@+2 2 {{previous definition is here}}12#endif13struct field_attr_test {14  void (CFI_UNCHECKED_CALLEE *func)(void);15};16 17#if __STDC_VERSION__ < 202311L18// expected-error@+2{{redefinition of 'field_attr_test'}}19#endif20struct field_attr_test {21  void (CFI_UNCHECKED_CALLEE *func)(void);22};23 24typedef void (CFI_UNCHECKED_CALLEE func_t)(void);25 26#if __STDC_VERSION__ < 202311L27// expected-error@+2{{redefinition of 'field_attr_test'}}28#endif29struct field_attr_test {30  func_t *func;31};32