Removed a large number of changes inserted by Per Bothner
for C++ support. These will go back in when they've been examined.
This commit is contained in:
parent
5148923360
commit
2640f7e138
10 changed files with 103 additions and 351 deletions
|
@ -513,15 +513,6 @@ lookup_signed_typename (name)
|
|||
return lookup_typename (name, (struct block *) NULL, 0);
|
||||
}
|
||||
|
||||
struct type *
|
||||
check_struct (type)
|
||||
struct type *type;
|
||||
{
|
||||
if (TYPE_CODE (type) != TYPE_CODE_STRUCT)
|
||||
error ("This context has %s, not a struct or class.", TYPE_NAME (type));
|
||||
return type;
|
||||
}
|
||||
|
||||
/* Lookup a structure type named "struct NAME",
|
||||
visible in lexical block BLOCK. */
|
||||
|
||||
|
@ -539,16 +530,11 @@ lookup_struct (name, block)
|
|||
{
|
||||
error ("No struct type named %s.", name);
|
||||
}
|
||||
return check_struct (SYMBOL_TYPE (sym));
|
||||
}
|
||||
|
||||
struct type *
|
||||
check_union (type)
|
||||
struct type *type;
|
||||
{
|
||||
if (TYPE_CODE (type) != TYPE_CODE_UNION)
|
||||
error ("This context has %s, not a union.", TYPE_NAME (type));
|
||||
return type;
|
||||
if (TYPE_CODE (SYMBOL_TYPE (sym)) != TYPE_CODE_STRUCT)
|
||||
{
|
||||
error ("This context has class, union or enum %s, not a struct.", name);
|
||||
}
|
||||
return (SYMBOL_TYPE (sym));
|
||||
}
|
||||
|
||||
/* Lookup a union type named "union NAME",
|
||||
|
@ -568,16 +554,11 @@ lookup_union (name, block)
|
|||
{
|
||||
error ("No union type named %s.", name);
|
||||
}
|
||||
return check_union (SYMBOL_TYPE (sym));
|
||||
}
|
||||
|
||||
struct type *
|
||||
check_enum (type)
|
||||
struct type *type;
|
||||
{
|
||||
if (TYPE_CODE (type) != TYPE_CODE_ENUM)
|
||||
error ("This context has %s, not an enum.", TYPE_NAME (type));
|
||||
return type;
|
||||
if (TYPE_CODE (SYMBOL_TYPE (sym)) != TYPE_CODE_UNION)
|
||||
{
|
||||
error ("This context has class, struct or enum %s, not a union.", name);
|
||||
}
|
||||
return (SYMBOL_TYPE (sym));
|
||||
}
|
||||
|
||||
/* Lookup an enum type named "enum NAME",
|
||||
|
@ -596,7 +577,11 @@ lookup_enum (name, block)
|
|||
{
|
||||
error ("No enum type named %s.", name);
|
||||
}
|
||||
return check_enum (SYMBOL_TYPE (sym));
|
||||
if (TYPE_CODE (SYMBOL_TYPE (sym)) != TYPE_CODE_ENUM)
|
||||
{
|
||||
error ("This context has class, struct or union %s, not an enum.", name);
|
||||
}
|
||||
return (SYMBOL_TYPE (sym));
|
||||
}
|
||||
|
||||
/* Lookup a template type named "template NAME<TYPE>",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue