FreeBSD/contrib/gcc/cp/decl.c
/* When a label goes out of scope, check to see if that label was used
   in a valid manner, and issue any appropriate warnings or errors.  */
When a label goes out of scope, check to see if that label was used
in a valid manner, and issue any appropriate warnings or errors.
When a label goes out of scope check to see if that label was used in a valid manner and issue any appropriate warnings or errors .
static void
pop_label (tree label, tree old_value)
{
  if (!processing_template_decl)
    {
      if (DECL_INITIAL (label) == NULL_TREE)
	{
	  location_t location;
	  error ("label %q+D used but not defined", label);
#ifdef USE_MAPPED_LOCATION
	  location = input_location; 
#else
	  location.file = input_filename;
	  location.line = 0;
#endif
	  define_label (location, DECL_NAME (label));
	}
      else if (!TREE_USED (label))
	warning (OPT_Wunused_label, "label %q+D defined but not used", label);
    }
  SET_IDENTIFIER_LABEL_VALUE (DECL_NAME (label), old_value);
}
static void pop_label ( tree label , tree old_value ) { if ( ! processing_template_decl ) { if ( DECL_INITIAL ( label ) == NULL_TREE ) { location_t location ; error ( " " , label ) ; #ifdef USE_MAPPED_LOCATION location = input_location ; #else location . file = input_filename ; location . line = 0 ; #endif define_label ( location , DECL_NAME ( label ) ) ; } else if ( ! TREE_USED ( label ) ) warning ( OPT_Wunused_label , " " , label ) ; } SET_IDENTIFIER_LABEL_VALUE ( DECL_NAME ( label ) , old_value ) ; }
When a label goes out of scope, check to see if that label was used
in a valid manner, and issue any appropriate warnings or errors.
When a label goes out of scope check to see if that label was used in a valid manner and issue any appropriate warnings or errors .
/* FIXME want (input_filename, (line)0) */ /* Avoid crashing later.  */