Commit Graph

21 Commits

Author SHA1 Message Date
Kaveh R. Ghazi
f5984164b7 gxx.gperf (hash, [...]): Add prototypes.
* gxx.gperf (hash, is_reserved_word): Add prototypes.

	* init.c (build_vec_init): Initialize variable `try_block'.

	* lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
	Likewise for bzero/memset.
	(token_getch, token_put_back): Add static prototypes.  Remove
	`inline' from the definitions.
	(retrofit_lang_decl): Call memset, not bzero, to avoid casts.

From-SVN: r29042
1999-09-02 03:13:16 +00:00
Mark Mitchell
6eabb2412f extend.texi (C++ Signatures): Remove node.
* extend.texi (C++ Signatures): Remove node.
	* invoke.texi: Remove discussion of -fhandle-signatures,
	signature, sigof, __signature__, and __sigof__.

	* Make-lang.in (CXX_SRCS): Remove sig.c.
	* Makefile.in (CXX_OBJS): Remove sig.o.
	(sig.o): Remove.
	* cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
	(CPTI_SIGNATURE_TYPE): Likewise.
	(CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
	(opaque_type_node): Likewise.
	(signature_type_node): Likewise.
	(sigtable_entry_type): Likewise.
	(flag_handle_signatures): Likewise.
	(lang_type): Remove is_signature, is_signature_pointer,
	is_signature_reference, has_opaque_typedecls,
	sigtables_has_been_generated.  Adjust dummy.  Remove signature,
	signature_pointer_to, signature_reference_to.
	(IS_SIGNATURE): Remove.
	(SET_SIGNATURE): Remove.
	(CLEAR_SIGNATURE): Remove.
	(IS_SIGNATURE_POINTER): Remove.
	(IS_SIGNATURE_REFERENCE): Remove.
	(SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
	(SIGTABLE_HAS_BEEN_GENERATED): Remove.
	(CLASSTYPE_SIGNATURE): Remove.
	(SIGNATURE_TYPE): Remove.
	(SIGNATURE_METHOD_VEC): Remove.
	(SIGNATURE_POINTER_TO): Remove.
	(SIGNATURE_REFERENCE_TO): Remove.
	(lang_decl_flags): Remove is_default_implementation.  Rename
	memfunc_pointer_to to saved_tree.
	(IS_DEFAULT_IMPLEMENTATION): Remove.
	(DECL_MEMFUNC_POINTER_TO): Remove.
	(DECL_MEMFUNC_POINTING_TO): Remove.
	(DECL_SAVED_TREE): Adjust definition.
	(tag_types): Remove signature_type_node.
	(SIGNATURE_FIELD_NAME): Remove.
	(SIGNATURE_FIELD_NAME_FORMAT): Likewise.
	(SIGNATURE_OPTR_NAME): Likewise.
	(SIGNATURE_SPTR_NAME): Likewise.
	(SIGNATURE_POINTER_NAME): Likewise.
	(SIGNATURE_POINTER_NAME_FORMAT): Likewise.
	(SIGNATURE_REFERENCE_NAME): Likewise.
	(SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
	(SIGTABLE_PTR_TYPE): Likewise.
	(SIGTABLE_NAME_FORMAT): Likewise.
	(SIGTABLE_NAME_FORMAT_LONG): Likewise.
	(SIGTABLE_TAG_NAME): Likewise.
	(SIGTABLE_VB_OFF_NAME): Likewise.
	(SIGTABLE_VT_OFF_NAME): Likewise.
	(finish_base_specifiers): Change prototype.
	(build_signature_pointer_type): Remove.
	(build_signature_reference_type): Remove.
	(build_signature_pointer_constructor): Remove.
	(build_signature_method_call): Remove.
	(build_optr_ref): Likewise.
	(append_signature_fields): Likewise.
	(signature_error): Likewise.
	* call.c (build_this): Remove signature support.
	(build_over_call): Likewise.
	(build_new_method_call): Likewise.
	* class.c (add_implicitly_declared_members): Likewise.
	(finish_struct_1): Likewise.
	(finish_struct): Likewise.
	* cvt.c (cp_convert_to_pointer): Likewise.
	(convert_to_pointer_force): Likewise.
	(ocp_convert): Likewise.
	* decl.c (sigtable_decl_p): Remove.
	(init_decl_processing): Remove support for signatures.
	(cp_finish_decl): Likewise.
	(grokdeclarator): Likewise.
	(grokparms): Likewise.
	(xref_tag): Likewise.
	(start_function): Likewise.
	(start_method): Likewise.
	* decl2.c (finish_sigtable_vardecl): Remove.
	(flag_handle_signatures): Remove.
	(lang_f_options): Remove handle-signatures.
	(grokfield): Remove support for signatures.
	(grokbitfield): Likewise.
	(finish_file): Likewise.
	(reparse_absdcl_as_casts): Likewise.
	* error.c (dump_type_real): Likewise.
	(dump_function_decl): Likewise.
	* friend.c (make_friend_class): Likewise.
	* gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
	* hash.h: Regenerated.
	* init.c (build_new_1): Remove support for signatures.
	* lang-options.h: Remove -fhandle-signatures,
	-fno-handle-signatures.
	* lex.c (init_parse): Remove support for signatures.
	(yyprint): Likewise.
	* lex.h (rid): Remove RID_SIGNATURE.
	* method.c (build_decl_overload_real): Remove support for
	signatures.
	(hack_identifier): Likewise.
	* parse.y (base_class): Likewise.
	(base_class.1): Likewise.
	(access_specifier): Likewise.
	* search.c (lookup_member): Likewise.
	* semantics.c (finish_qualified_object_call_expr): Likewise.
	(finish_template_type_parm): Likewise.
	(begin_class_definition): Likewise.
	(finish_base_specifier): Likewise.
	* sig.c: Remove.
	* tree.c (build_cplus_method_type): Remove support for signatures.
	* typeck.c (require_complete_type): Likewise.
	(c_sizeof): Likewise.
	(c_alignof): Likewise.
	(build_object_ref): Likewise.
	(build_component_ref): Likewise.
	(build_indirect_ref): Likewise.
	(build_c_cast): Likewise.
	(build_modify_expr): Likewise.
	(convert_for_initialization): Likewise.
	* typeck2.c (signature_error): Remove.
	(store_init_value): Remove support for signatures.
	(digest_init): Likewise.
	(build_x_arrow): Likewise.
	(build_functional_cast): Likewise.
	* xref.c (GNU_xref_decl): Likewise.

From-SVN: r28677
1999-08-11 20:22:41 +00:00
Richard Henderson
4a4b0aa39e decl.c (ptr_type_node, [...]): New.
* decl.c (ptr_type_node, va_list_type_node): New.
        * gxx.gperf (__builtin_va_arg): New.
        * parse.y (VA_ARG): New token.
        (unary_expr): Recognize it.

From-SVN: r28242
1999-07-25 18:19:44 -07:00
Mark Mitchell
adecb3f41f Make-lang.in (cc1plus): Make it depend on gxx.gperf.
* Make-lang.in (cc1plus): Make it depend on gxx.gperf.
	* cp-tree.h: Fix typo in documentation on pointers-to-members.
	(cp_build_qualified_type): Make it a macro.
	(cp_build_qualified_type_real): Declare.
	* decl.c (grokdeclarator): Remove misleading comment.  Avoid
	problem with template parameters and restrict-qualification.
	* gxx.gperf: Replace NORID with RID_UNUSED throughout.
	* hash.h: Regenerated.
	* lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
	the enumeration.
	(NORID): Remove definition.
	* pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
	(tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
	(fn_type_unification): Check that the function type resulting from
	the deduction is legal.
	(check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
	(unify): Use cp_build_qualified_type_real.
	* tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
	(cp_build_qualified_type): Rename to ...
	(cp_build_qualified_type_real): Add additional COMPLAIN parameter
	and modify appropriately.

Co-Authored-By: Nathan Sidwell <nathan@acm.org>

From-SVN: r27086
1999-05-21 15:55:56 +00:00
Mark Mitchell
3dcaad8b2d gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes with the RTL code RETURN.
* gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
	with the RTL code RETURN.
	* hash.h: Regenerated.
	* lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
	* parse.y: Replace RETURN with RETURN_KEYWORD throughout.
	* parse.c: Regenerated.
	* pt.c: Include varray.h.  Include rtl.h since varray.h requires
	it.
	(inline_parm_levels): New variable.
	(inline_parm_levels_used): Likewise.
	(maybe_begin_member_template_processing): Update them.
	(maybe_end_member_template_processing): Use them, rather than
	guessing how many levels to pop.

From-SVN: r26587
1999-04-22 17:37:02 +00:00
Kaveh R. Ghazi
8e6befc1df Makefile.in (hash.h): Generate using gperf language 'C'...
* Makefile.in (hash.h): Generate using gperf language 'C', not
        'KR-C', so gperf uses the `const' keyword on strings.
        * gxx.gperf (resword): Const-ify a char*.

From-SVN: r26081
1999-03-31 07:51:10 +00:00
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
Kaveh R. Ghazi
9e46e5e862 Warning fixes:
* Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
        (gxx.gperf): Update comments describing invocation flags.
        (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).

From-SVN: r22888
1998-10-07 09:50:45 +00:00
Benjamin Kosnik
4880e218b7 spew.c (yylex): Give diagnostic.
�
1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
	* spew.c (yylex): Give diagnostic.
	* hash.h (is_reserved_word): Add export.
	* gxx.gperf: Ditto.
	* lex.h (rid): Add RID_EXPORT.
	* lex.c (init_parse): Ditto.

From-SVN: r22579
1998-09-24 22:29:29 +00:00
Mark Mitchell
ce4a03916c cp-tree.h (finish_unary_op_expr): New function.
* cp-tree.h (finish_unary_op_expr): New function.
	(finish_id_expr): Likewise.
	(begin_new_placement): Likewise.
	(finish_new_placement): Likewise.
	(finish_declarator): Likewise.
	(finish_translation_unit): Likewise.
	(finish_parmlist): Likewise.
	(begin_class_definition): Likewise.
	(finish_class_definition): Likewise.
	(finish_default_args): Likewise.
	(finish_inline_definitions): Likewise.
	* parse.y (GCC_ASM_KEYWORD): Remove.
	(TYPENAME_ELLIPSIS): Likewise.
	* parse.c: Regenerated.
	Use new functions in semantics.c in the actions for many rules.
	* gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
	* hash.h: Regenerated.
	* semantics.c (finish_expr_stmt): Allow NULL expr.
	(finish_unary_op_expr): New function, containing
	code previously in parse.y.
	(finish_id_expr): Likewise.
	(begin_new_placement): Likewise.
	(finish_new_placement): Likewise.
	(finish_declarator): Likewise.
	(finish_translation_unit): Likewise.
	(finish_parmlist): Likewise.
	(begin_class_definition): Likewise.
	(finish_class_definition): Likewise.
	(finish_default_args): Likewise.
	(finish_inline_definitions): Likewise.

From-SVN: r19660
1998-05-11 00:07:25 +00:00
Mike Stump
37c46b43db 91th Cygnus<->FSF quick merge
From-SVN: r14134
1997-05-28 23:20:02 +00:00
Mike Stump
d22c85969b 89th Cygnus<->FSF quick merge
From-SVN: r12953
1996-10-11 20:19:33 +00:00
Mike Stump
c11b6f21eb merging
From-SVN: r12700
1996-09-12 19:19:15 +00:00
Mike Stump
c73964b2fb 87th Cygnus<->FSF quick merge
From-SVN: r12606
1996-08-08 22:54:56 +00:00
Mike Stump
f30432d726 75th Cygnus<->FSF merge
From-SVN: r10438
1995-10-12 02:33:51 +00:00
Mike Stump
e1cd6e56ad 53rd Cygnus<->FSF merge
From-SVN: r8794
1995-01-24 08:19:58 +00:00
Mike Stump
db5ae43ff2 49th Cygnus<->FSF merge
From-SVN: r8570
1994-11-29 00:59:16 +00:00
Mike Stump
2986ae008b 38th Cygnus<->FSF merge
From-SVN: r7337
1994-05-19 20:19:03 +00:00
Mike Stump
a4443a0855 37th Cygnus<->FSF merge
From-SVN: r7290
1994-05-13 02:46:07 +00:00
Mike Stump
8d2733caec 36th Cygnus<->FSF merge
From-SVN: r7221
1994-05-06 09:27:46 +00:00
Mike Stump
8d08fdba59 Initial revision
From-SVN: r6613
1994-02-24 01:02:37 +00:00