FreeBSD/contrib/gcc/c-decl.c
/* Print warning about variable length array if necessary.  */
Print warning about variable length array if necessary.
Print warning about variable length array if necessary .
static void
warn_variable_length_array (const char *name, tree size)
{
  int ped = !flag_isoc99 && pedantic && warn_vla != 0;
  int const_size = TREE_CONSTANT (size);
  if (ped)
    {
      if (const_size)
	{
	  if (name)
	    pedwarn ("ISO C90 forbids array %qs whose size "
		     "can%'t be evaluated",
		     name);
	  else
	    pedwarn ("ISO C90 forbids array whose size "
		     "can%'t be evaluated");
	}
      else
	{
	  if (name) 
	    pedwarn ("ISO C90 forbids variable length array %qs",
		     name);
	  else
	    pedwarn ("ISO C90 forbids variable length array");
	}
    }
  else if (warn_vla > 0)
    {
      if (const_size)
        {
	  if (name)
	    warning (OPT_Wvla,
		     "the size of array %qs can"
		     "%'t be evaluated", name);
	  else
	    warning (OPT_Wvla,
		     "the size of array can %'t be evaluated");
	}
      else
	{
	  if (name)
	    warning (OPT_Wvla,
		     "variable length array %qs is used",
		     name);
	  else
	    warning (OPT_Wvla,
		     "variable length array is used");
	}
    }
}
static void warn_variable_length_array ( const char * name , tree size ) { int ped = ! flag_isoc99 && pedantic && warn_vla != 0 ; int const_size = TREE_CONSTANT ( size ) ; if ( ped ) { if ( const_size ) { if ( name ) pedwarn ( " " " " , name ) ; else pedwarn ( " " " " ) ; } else { if ( name ) pedwarn ( " " , name ) ; else pedwarn ( " " ) ; } } else if ( warn_vla > 0 ) { if ( const_size ) { if ( name ) warning ( OPT_Wvla , " " " " , name ) ; else warning ( OPT_Wvla , " " ) ; } else { if ( name ) warning ( OPT_Wvla , " " , name ) ; else warning ( OPT_Wvla , " " ) ; } } }
Print warning about variable length array if necessary.
Print warning about variable length array if necessary .