(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
wtr-suffix-1.c
       1  /* Test for -Wtraditional warnings on integer constant suffixes.
       2     Note, gcc should omit these warnings in system header files.
       3     Origin: Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8/24/2000.  */
       4  /* { dg-do compile } */
       5  /* { dg-options "-Wtraditional" } */
       6  
       7  void
       8  testfunc ()
       9  {
      10    int i;
      11    double f;
      12  
      13    i = 1L;
      14    i = 1l;
      15    i = 1U; /* { dg-warning "traditional C rejects" "numeric constant suffix" } */
      16    i = 1u; /* { dg-warning "traditional C rejects" "numeric constant suffix" } */
      17    f = 1.0;
      18    f = 1.0F; /* { dg-warning "traditional C rejects" "numeric constant suffix" } */
      19    f = 1.0f; /* { dg-warning "traditional C rejects" "numeric constant suffix" } */
      20    f = 1.0L; /* { dg-warning "traditional C rejects" "numeric constant suffix" } */
      21    f = 1.0l; /* { dg-warning "traditional C rejects" "numeric constant suffix" } */
      22   
      23  # 24 "sys-header.h" 3
      24  /* We are in system headers now, no -Wtraditional warnings should issue.  */
      25  
      26    i = 1L;
      27    i = 1l;
      28    i = 1U;
      29    i = 1u;
      30    f = 1.0;
      31    f = 1.0F;
      32    f = 1.0f;
      33    f = 1.0L;
      34    f = 1.0l;
      35  }