llvm-gcc-4.2-2.9/gcc/cp/parser.c
/* Update the DECL_SPECS to reflect the TYPE_SPEC.  If USER_DEFINED_P
   is true, the type is a user-defined type; otherwise it is a
   built-in type specified by a keyword.  */
Update the DECL_SPECS to reflect the TYPE_SPEC.  If USER_DEFINED_P
is true, the type is a user-defined type; otherwise it is a
built-in type specified by a keyword.
Update the DECL_SPECS to reflect the TYPE_SPEC . If USER_DEFINED_P is true the type is a user - defined type ; otherwise it is a built - in type specified by a keyword .
static void
cp_parser_set_decl_spec_type (cp_decl_specifier_seq *decl_specs,
			      tree type_spec,
			      bool user_defined_p)
{
  decl_specs->any_specifiers_p = true;
  if (decl_specs->specs[(int) ds_typedef]
      && !user_defined_p
      && (type_spec == boolean_type_node
	  || type_spec == wchar_type_node)
      && (decl_specs->type
	  || decl_specs->specs[(int) ds_long]
	  || decl_specs->specs[(int) ds_short]
	  || decl_specs->specs[(int) ds_unsigned]
	  || decl_specs->specs[(int) ds_signed]))
    {
      decl_specs->redefined_builtin_type = type_spec;
      if (!decl_specs->type)
	{
	  decl_specs->type = type_spec;
	  decl_specs->user_defined_type_p = false;
	}
    }
  else if (decl_specs->type)
    decl_specs->multiple_types_p = true;
  else
    {
      decl_specs->type = type_spec;
      decl_specs->user_defined_type_p = user_defined_p;
      decl_specs->redefined_builtin_type = NULL_TREE;
    }
}
static void cp_parser_set_decl_spec_type ( cp_decl_specifier_seq * decl_specs , tree type_spec , bool user_defined_p ) { decl_specs -> any_specifiers_p = true ; if ( decl_specs -> specs [ ( int ) ds_typedef ] && ! user_defined_p && ( type_spec == boolean_type_node || type_spec == wchar_type_node ) && ( decl_specs -> type || decl_specs -> specs [ ( int ) ds_long ] || decl_specs -> specs [ ( int ) ds_short ] || decl_specs -> specs [ ( int ) ds_unsigned ] || decl_specs -> specs [ ( int ) ds_signed ] ) ) { decl_specs -> redefined_builtin_type = type_spec ; if ( ! decl_specs -> type ) { decl_specs -> type = type_spec ; decl_specs -> user_defined_type_p = false ; } } else if ( decl_specs -> type ) decl_specs -> multiple_types_p = true ; else { decl_specs -> type = type_spec ; decl_specs -> user_defined_type_p = user_defined_p ; decl_specs -> redefined_builtin_type = NULL_TREE ; } }
Update the DECL_SPECS to reflect the TYPE_SPEC.
Update the DECL_SPECS to reflect the TYPE_SPEC .
/* If the user tries to redeclare bool or wchar_t (with, for
     example, in "typedef int wchar_t;") we remember that this is what
     happened.  In system headers, we ignore these declarations so
     that G++ can work with system headers that are not C++-safe.  */