8sa1-gcc/gcc/cp/gxx.gperf

117 lines
3.4 KiB
Plaintext
Raw Normal View History

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