modernc.org/ccgo/v3@v3.16.14/lib/testdata/tcc-0.9.27/tests/tests2/60_errors_and_warnings.c (about)

     1  #if defined test_56_btype_excess_1
     2  struct A {} int i;
     3  
     4  #elif defined test_57_btype_excess_2
     5  char int i;
     6  
     7  #elif defined test_58_function_redefinition
     8  int f(void) { return 0; }
     9  int f(void) { return 1; }
    10  
    11  #elif defined test_global_redefinition
    12  int xxx = 1;
    13  int xxx;
    14  int xxx = 2;
    15  
    16  #elif defined test_59_function_array
    17  int (*fct)[42](int x);
    18  
    19  #elif defined test_60_enum_redefinition
    20  enum color { RED, GREEN, BLUE };
    21  enum color { R, G, B };
    22  enum color c;
    23  
    24  #elif defined test_62_enumerator_redefinition
    25  enum color { RED, GREEN, BLUE };
    26  enum rgb { RED, G, B};
    27  enum color c = RED;
    28  
    29  #elif defined test_63_local_enumerator_redefinition
    30  enum {
    31      FOO,
    32      BAR
    33  };
    34  
    35  int main(void)
    36  {
    37      enum {
    38          FOO = 2,
    39          BAR
    40      };
    41  
    42      return BAR - FOO;
    43  }
    44  
    45  #elif defined test_61_undefined_enum
    46  enum rgb3 c = 42;
    47  
    48  #elif defined test_74_non_const_init
    49  int i = i++;
    50  
    51  #endif