1994-02-23 20:02:37 -05:00
|
|
|
%{
|
1998-10-07 05:50:45 -04:00
|
|
|
/* Command-line: gperf -L KR-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 { char *name; short token; enum rid rid;};
|
|
|
|
%%
|
|
|
|
__alignof, ALIGNOF, NORID
|
|
|
|
__alignof__, ALIGNOF, NORID
|
1998-05-10 20:07:25 -04:00
|
|
|
__asm, ASM_KEYWORD, NORID
|
|
|
|
__asm__, ASM_KEYWORD, NORID
|
1994-02-23 20:02:37 -05:00
|
|
|
__attribute, ATTRIBUTE, NORID
|
|
|
|
__attribute__, ATTRIBUTE, NORID
|
1997-05-28 19:20:02 -04:00
|
|
|
__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
|
1994-02-23 20:02:37 -05:00
|
|
|
__extension__, EXTENSION, NORID
|
1997-05-28 19:20:02 -04:00
|
|
|
__imag, IMAGPART, NORID
|
|
|
|
__imag__, IMAGPART, NORID
|
1994-02-23 20:02:37 -05:00
|
|
|
__inline, SCSPEC, RID_INLINE
|
|
|
|
__inline__, SCSPEC, RID_INLINE
|
|
|
|
__label__, LABEL, NORID
|
1996-08-08 18:54:56 -04:00
|
|
|
__null, CONSTANT, RID_NULL
|
1997-05-28 19:20:02 -04:00
|
|
|
__real, REALPART, NORID
|
|
|
|
__real__, REALPART, NORID
|
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
|
1995-01-24 03:19:58 -05:00
|
|
|
__signature__, AGGR, RID_SIGNATURE /* Extension */,
|
1994-02-23 20:02:37 -05:00
|
|
|
__signed, TYPESPEC, RID_SIGNED
|
|
|
|
__signed__, TYPESPEC, RID_SIGNED
|
1995-01-24 03:19:58 -05:00
|
|
|
__sigof__, SIGOF, NORID /* Extension */,
|
1994-02-23 20:02:37 -05:00
|
|
|
__typeof, TYPEOF, NORID
|
|
|
|
__typeof__, TYPEOF, NORID
|
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, NORID,
|
1994-11-28 19:59:16 -05:00
|
|
|
and, ANDAND, NORID,
|
|
|
|
and_eq, ASSIGN, NORID,
|
1994-02-23 20:02:37 -05:00
|
|
|
auto, SCSPEC, RID_AUTO,
|
1994-11-28 19:59:16 -05:00
|
|
|
bitand, '&', NORID,
|
|
|
|
bitor, '|', NORID,
|
1994-05-19 16:19:03 -04:00
|
|
|
bool, TYPESPEC, RID_BOOL,
|
1994-02-23 20:02:37 -05:00
|
|
|
break, BREAK, NORID,
|
|
|
|
case, CASE, NORID,
|
|
|
|
catch, CATCH, NORID,
|
|
|
|
char, TYPESPEC, RID_CHAR,
|
|
|
|
class, AGGR, RID_CLASS,
|
1994-11-28 19:59:16 -05:00
|
|
|
compl, '~', NORID,
|
1996-09-12 15:19:15 -04:00
|
|
|
const, CV_QUALIFIER, RID_CONST,
|
1994-05-12 22:46:07 -04:00
|
|
|
const_cast, CONST_CAST, NORID,
|
1994-02-23 20:02:37 -05:00
|
|
|
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,
|
1994-11-28 19:59:16 -05:00
|
|
|
explicit, SCSPEC, RID_EXPLICIT,
|
1998-09-24 18:29:29 -04:00
|
|
|
export, SCSPEC, RID_EXPORT,
|
1994-02-23 20:02:37 -05:00
|
|
|
extern, SCSPEC, RID_EXTERN,
|
1994-05-19 16:19:03 -04:00
|
|
|
false, CXX_FALSE, NORID,
|
1994-02-23 20:02:37 -05:00
|
|
|
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,
|
1994-11-28 19:59:16 -05:00
|
|
|
namespace, NAMESPACE, NORID,
|
1994-02-23 20:02:37 -05:00
|
|
|
new, NEW, NORID,
|
1994-11-28 19:59:16 -05:00
|
|
|
not, '!', NORID,
|
|
|
|
not_eq, EQCOMPARE, NORID,
|
1994-02-23 20:02:37 -05:00
|
|
|
operator, OPERATOR, NORID,
|
1994-11-28 19:59:16 -05:00
|
|
|
or, OROR, NORID,
|
|
|
|
or_eq, ASSIGN, NORID,
|
1994-02-23 20:02:37 -05:00
|
|
|
private, VISSPEC, RID_PRIVATE,
|
|
|
|
protected, VISSPEC, RID_PROTECTED,
|
|
|
|
public, VISSPEC, RID_PUBLIC,
|
|
|
|
register, SCSPEC, RID_REGISTER,
|
1994-05-12 22:46:07 -04:00
|
|
|
reinterpret_cast, REINTERPRET_CAST, NORID,
|
1994-02-23 20:02:37 -05:00
|
|
|
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,
|
1994-05-12 22:46:07 -04:00
|
|
|
static_cast, STATIC_CAST, NORID,
|
1994-02-23 20:02:37 -05:00
|
|
|
struct, AGGR, RID_RECORD,
|
|
|
|
switch, SWITCH, NORID,
|
1994-11-28 19:59:16 -05:00
|
|
|
template, TEMPLATE, RID_TEMPLATE,
|
1994-02-23 20:02:37 -05:00
|
|
|
this, THIS, NORID,
|
1994-05-06 05:27:46 -04:00
|
|
|
throw, THROW, NORID,
|
1994-05-19 16:19:03 -04:00
|
|
|
true, CXX_TRUE, NORID,
|
1994-05-06 05:27:46 -04:00
|
|
|
try, TRY, NORID,
|
1994-02-23 20:02:37 -05:00
|
|
|
typedef, SCSPEC, RID_TYPEDEF,
|
1994-11-28 19:59:16 -05:00
|
|
|
typename, TYPENAME_KEYWORD, NORID,
|
1994-02-23 20:02:37 -05:00
|
|
|
typeid, TYPEID, NORID,
|
1994-11-28 19:59:16 -05:00
|
|
|
typeof, TYPEOF, NORID,
|
1994-02-23 20:02:37 -05:00
|
|
|
union, AGGR, RID_UNION,
|
|
|
|
unsigned, TYPESPEC, RID_UNSIGNED,
|
1994-11-28 19:59:16 -05:00
|
|
|
using, USING, NORID,
|
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,
|
1994-02-23 20:02:37 -05:00
|
|
|
while, WHILE, NORID,
|
1994-11-28 19:59:16 -05:00
|
|
|
xor, '^', NORID,
|
|
|
|
xor_eq, ASSIGN, NORID,
|