FreeBSD/contrib/gcc/cp/decl.c
/* Begin compiling the definition of an enumeration type.
   NAME is its name.
   Returns the type object, as yet incomplete.
   Also records info about it so that build_enumerator
   may be used to declare the individual values as they are read.  */
Begin compiling the definition of an enumeration type.
NAME is its name.
Returns the type object, as yet incomplete.
Also records info about it so that build_enumerator
may be used to declare the individual values as they are read.
Begin compiling the definition of an enumeration type . NAME is its name . Returns the type object as yet incomplete . Also records info about it so that build_enumerator may be used to declare the individual values as they are read .
tree
start_enum (tree name)
{
  tree enumtype;
  gcc_assert (TREE_CODE (name) == IDENTIFIER_NODE);
  enumtype = lookup_and_check_tag (enum_type, name,
				   ts_current,
				   false);
  if (enumtype != NULL_TREE && TREE_CODE (enumtype) == ENUMERAL_TYPE)
    {
      error ("multiple definition of %q#T", enumtype);
      error ("%Jprevious definition here", TYPE_MAIN_DECL (enumtype));
      TYPE_VALUES (enumtype) = NULL_TREE;
    }
  else
    {
      if (enumtype == error_mark_node)
	name = make_anon_name ();
      enumtype = make_node (ENUMERAL_TYPE);
      enumtype = pushtag (name, enumtype, ts_current);
    }
  return enumtype;
}
tree start_enum ( tree name ) { tree enumtype ; gcc_assert ( TREE_CODE ( name ) == IDENTIFIER_NODE ) ; enumtype = lookup_and_check_tag ( enum_type , name , ts_current , false ) ; if ( enumtype != NULL_TREE && TREE_CODE ( enumtype ) == ENUMERAL_TYPE ) { error ( " " , enumtype ) ; error ( " " , TYPE_MAIN_DECL ( enumtype ) ) ; TYPE_VALUES ( enumtype ) = NULL_TREE ; } else { if ( enumtype == error_mark_node ) name = make_anon_name ( ) ; enumtype = make_node ( ENUMERAL_TYPE ) ; enumtype = pushtag ( name , enumtype , ts_current ) ; } return enumtype ; }
Begin compiling the definition of an enumeration type.
Begin compiling the definition of an enumeration type .
/* If this is the real definition for a previous forward reference,
     fill in the contents in the same object that used to be the
     forward reference.  */ /*tag_scope=*/ /*template_header_p=*/ /* Clear out TYPE_VALUES, and start again.  */ /* In case of error, make a dummy enum to allow parsing to
	 continue.  */ /*tag_scope=*/