8sa1-gcc/gcc/cp/gxx.gperf
Mark Mitchell 91063b5138 cplus-dem.c (work_stuff): Replace const_type and volatile_type with type_quals.
* cplus-dem.c (work_stuff): Replace const_type and volatile_type
	with type_quals.
	(TYPE_UNQUALIFIED): New macro.
	(TYPE_QUAL_CONST): Likewise.
	(TYPE_QUAL_VOLATILE): Likewise.
	(TYPE_QUAL_RESTRICT): Likewise.
	(code_for_qualifier): New function.
	(qualifier_string): Likewise.
	(demangle_qualifier): Likewise.
	(internal_cplus_demangle): Use them.
	(demangle_signature): Likewise.
	(demangle_template_value_parm): Likewise.
	(do_type): Likewise.
	(demangle_fund_type)): Likewise.
	* Makefile.in (hash.h): Run gperf when necessary.
	* cp-tree.h (CP_TYPE_READONLY): Remove.
	(CP_TYPE_VOLATILE): Likewise.
	(CP_TYPE_QUALS): New macro.
	(CP_TYPE_CONST_P): Likewise.
	(CP_TYPE_VOLATILE_P): Likewise.
	(CP_TYPE_RESTRICT_P): Likewise.
	(CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
	(cp_build_type_variant): Rename to ...
	(cp_build_qualified_type): New function.
	(c_apply_type_quals_to_decl): Declare.
	(SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
	(SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
	(cp_type_qual_from_rid): New function.
	(compparms): Remove unused parameter.  All callers changed.
	(cp_type_quals): New function.
	(at_least_as_qualified_p): Likewise.
	(more_qualified_p): Likewise.
	* call.c (standard_conversion): Replace calls to
	cp_build_type_variant with cp_build_qualified_type.  Use
	CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
	compare them.  Use CP_TYPE_* macros to check qualifiers.
	(reference_binding): Likewise.
	(implicit_conversion): Likewise.
	(add_builtin_candidates): Likewise.
	(build_over_call): Likewise.
	* class.c (overrides): Compare all qualifiers, not just `const',
	on method declarations.
	* cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
	(convert_pointer_to_real): Likewise.
	(type_promotes_to): Likewise.
	* decl.c (check_for_uninitialized_const_var): New function.
	(init_decl_processing): More CP_TYPE_QUALS conversion, etc.
	(cp_finish_decl): Use check_for_uninitialized_const_var.
	(grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
	handle `restrict'.
	(grok_ctor_properties): Likewise.
	(grok_op_properties): Likewise.
	(start_function): Likewise.
	(rever_static_member_fn): Likewise.
	* decl2.c (grok_method_quals): Likewise.
	(grokfield): Likewise.
	* error.c (dump_readonly_or_volatile): Rename to ...
	(dump_qualifiers): New function.  Handle `restrict'.
	(dump_type_real): Use it.
	(dump_aggr_type): Likewise.
	(dump_type_prefix): Likewise.
	(dump_type_suffix): Likewise.
	(dump_function_decl): Likewise.
	(cv_as_string): Likewise.
	* gxx.gperf: Add __restrict and __restrict__.
	* gxxint.texi: Document `u' as used for `__restrict', and a few
	other previously undocumented codes.
	* hash.h: Regenerated.
	* init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
	(build_member_call): Likewise.
	(build_new_1): Likewise.
	* lex.c (init_parse): Add entry for RID_RESTRICT.
	(cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
	(cp_type_qual_from_rid): Define.
	* lex.h (enum rid): Add RID_RESTRICT.
	* method.c (process_modifiers): Deal with `restrict'.
	* parse.y (primary): More CP_TYPE_QUALS conversion, etc.
	* parse.c: Regenerated.
	* pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
	(tsubst_aggr_type): Likewise.
	(tsubst): Likewise.
	(check_cv_quals_for_unify): Likewise.
	(unify): Likewise.
	* rtti.c (init_rtti_processing): Likewise.
	(build_headof): Likewise.
	(get_tinfo_var): Likewise.
	(buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
	(expand_class_desc): Likewise.
	(expand_attr_desc): Likewise.
	(synthesize_tinfo_fn): Likewise.
	* search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
	(get_matching_virtual): Likewise.
	(expand_upcast_fixups): Likewise.
	* sig.c (build_signature_pointer_or_reference_name): Take
	type_quals, not constp and volatilep.
	(build_signature_pointer_or_reference_type): Likewise.
	(match_method_types): More CP_TYPE_QUALS conversion, etc.
	(build_signature_pointer_constructor): Likewise.
	(build_signature_method_call): Likewise.
	* tree.c (build_cplus_array_type): Likewise.
	(cp_build_type_variant): Rename to ...
	(cp_build_qualified_type): New function.  Deal with `__restrict'.
	(canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
	(build_exception_variant): Likewise.
	(mapcar): Likewise.
	* typeck.c (qualif_type): Likewise.
	(common_type): Likewise.
	(comptypes): Likewise.
	(comp_cv_target_types): Likewise.
	(at_least_as_qualified_p): Define.
	(more_qualified_p): Likewise.
	(comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
	(compparms): Likewise.
	(inline_conversion): Likewise.
	(string_conv_p): Likewise.
	(build_component_ref): Likewise.
	(build_indirect_ref): Likewise.
	(build_array_ref): Likewise.
	(build_unary_op): Likewise.
	(build_conditional_expr): Likewise.
	(build_static_cast): Likewise.
	(build_c_cast): Likewise.
	(build_modify_expr): Likewise.
	(convert_For_assignment): Likewise.
	(comp_ptr_ttypes_real): Likewise.
	(cp_type_quals): New function.

From-SVN: r23258
1998-10-23 14:53:28 +00:00

112 lines
3.0 KiB
Plaintext

%{
/* Command-line: gperf -L KR-C -F ', 0, 0' -p -j1 -g -o -t -N is_reserved_word -k1,4,$,7 gplus.gperf */
%}
struct resword { char *name; short token; enum rid rid;};
%%
__alignof, ALIGNOF, NORID
__alignof__, ALIGNOF, NORID
__asm, ASM_KEYWORD, NORID
__asm__, ASM_KEYWORD, NORID
__attribute, ATTRIBUTE, NORID
__attribute__, ATTRIBUTE, NORID
__complex, TYPESPEC, RID_COMPLEX
__complex__, TYPESPEC, RID_COMPLEX
__const, CV_QUALIFIER, RID_CONST
__const__, CV_QUALIFIER, RID_CONST
__extension__, EXTENSION, NORID
__imag, IMAGPART, NORID
__imag__, IMAGPART, NORID
__inline, SCSPEC, RID_INLINE
__inline__, SCSPEC, RID_INLINE
__label__, LABEL, NORID
__null, CONSTANT, RID_NULL
__real, REALPART, NORID
__real__, REALPART, NORID
__restrict, CV_QUALIFIER, RID_RESTRICT
__restrict__, CV_QUALIFIER, RID_RESTRICT
__signature__, AGGR, RID_SIGNATURE /* Extension */,
__signed, TYPESPEC, RID_SIGNED
__signed__, TYPESPEC, RID_SIGNED
__sigof__, SIGOF, NORID /* Extension */,
__typeof, TYPEOF, NORID
__typeof__, TYPEOF, NORID
__volatile, CV_QUALIFIER, RID_VOLATILE
__volatile__, CV_QUALIFIER, RID_VOLATILE
__wchar_t, TYPESPEC, RID_WCHAR /* Unique to ANSI C++ */,
asm, ASM_KEYWORD, NORID,
and, ANDAND, NORID,
and_eq, ASSIGN, NORID,
auto, SCSPEC, RID_AUTO,
bitand, '&', NORID,
bitor, '|', NORID,
bool, TYPESPEC, RID_BOOL,
break, BREAK, NORID,
case, CASE, NORID,
catch, CATCH, NORID,
char, TYPESPEC, RID_CHAR,
class, AGGR, RID_CLASS,
compl, '~', NORID,
const, CV_QUALIFIER, RID_CONST,
const_cast, CONST_CAST, NORID,
continue, CONTINUE, NORID,
default, DEFAULT, NORID,
delete, DELETE, NORID,
do, DO, NORID,
double, TYPESPEC, RID_DOUBLE,
dynamic_cast, DYNAMIC_CAST, NORID,
else, ELSE, NORID,
enum, ENUM, NORID,
explicit, SCSPEC, RID_EXPLICIT,
export, SCSPEC, RID_EXPORT,
extern, SCSPEC, RID_EXTERN,
false, CXX_FALSE, NORID,
float, TYPESPEC, RID_FLOAT,
for, FOR, NORID,
friend, SCSPEC, RID_FRIEND,
goto, GOTO, NORID,
if, IF, NORID,
inline, SCSPEC, RID_INLINE,
int, TYPESPEC, RID_INT,
long, TYPESPEC, RID_LONG,
mutable, SCSPEC, RID_MUTABLE,
namespace, NAMESPACE, NORID,
new, NEW, NORID,
not, '!', NORID,
not_eq, EQCOMPARE, NORID,
operator, OPERATOR, NORID,
or, OROR, NORID,
or_eq, ASSIGN, NORID,
private, VISSPEC, RID_PRIVATE,
protected, VISSPEC, RID_PROTECTED,
public, VISSPEC, RID_PUBLIC,
register, SCSPEC, RID_REGISTER,
reinterpret_cast, REINTERPRET_CAST, NORID,
return, RETURN, NORID,
short, TYPESPEC, RID_SHORT,
signature, AGGR, RID_SIGNATURE /* Extension */,
signed, TYPESPEC, RID_SIGNED,
sigof, SIGOF, NORID /* Extension */,
sizeof, SIZEOF, NORID,
static, SCSPEC, RID_STATIC,
static_cast, STATIC_CAST, NORID,
struct, AGGR, RID_RECORD,
switch, SWITCH, NORID,
template, TEMPLATE, RID_TEMPLATE,
this, THIS, NORID,
throw, THROW, NORID,
true, CXX_TRUE, NORID,
try, TRY, NORID,
typedef, SCSPEC, RID_TYPEDEF,
typename, TYPENAME_KEYWORD, NORID,
typeid, TYPEID, NORID,
typeof, TYPEOF, NORID,
union, AGGR, RID_UNION,
unsigned, TYPESPEC, RID_UNSIGNED,
using, USING, NORID,
virtual, SCSPEC, RID_VIRTUAL,
void, TYPESPEC, RID_VOID,
volatile, CV_QUALIFIER, RID_VOLATILE,
while, WHILE, NORID,
xor, '^', NORID,
xor_eq, ASSIGN, NORID,