1  /* Test #elifdef and #elifndef in C2x.  */
       2  /* { dg-do preprocess } */
       3  /* { dg-options "-std=c2x -pedantic-errors" } */
       4  
       5  #define A
       6  #undef B
       7  
       8  #if 0
       9  #elifdef A
      10  #define M1 1
      11  #endif
      12  
      13  #if M1 != 1
      14  #error "#elifdef A did not apply"
      15  #endif
      16  
      17  #if 0
      18  #elifdef B
      19  #error "#elifdef B applied"
      20  #endif
      21  
      22  #if 0
      23  #elifndef A
      24  #error "#elifndef A applied"
      25  #endif
      26  
      27  #if 0
      28  #elifndef B
      29  #define M2 2
      30  #endif
      31  
      32  #if M2 != 2
      33  #error "#elifndef B did not apply"
      34  #endif
      35  
      36  #if 0
      37  #elifdef A
      38  #else
      39  #error "#elifdef A did not apply"
      40  #endif
      41  
      42  #if 0
      43  #elifndef B
      44  #else
      45  #error "#elifndef B did not apply"
      46  #endif
      47  
      48  /* As with #elif, the syntax of the new directives is relaxed after a
      49     non-skipped group.  */
      50  
      51  #if 1
      52  #elifdef x * y
      53  #endif
      54  
      55  #if 1
      56  #elifndef !
      57  #endif