- 08 Feb, 2002 1 commit
-
-
* c-common.c (c_expand_expr): Revert 2002-02-06 patch. * c-parse.in (compstmt): Clear last_expr_type. * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr instead of compstmt. (compstmt_or_stmtexpr): Renamed from compstmt. (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type. * gcc.c-torture/execute/20020206-1.c: Test whether nesting 2 expression statements work instead. * gcc.dg/noncompile/20020207-1.c: New test. From-SVN: r49609
Jakub Jelinek committed
-
- 07 Feb, 2002 2 commits
-
-
* cp-tree.h (instantiate_type_flags): Rename to ... (tsubst_flags_t): ... here. Rename itf_complain to tf_error, add tf_warning flag. (instantiate_type): Adjust prototype. (tsubst, tsubst_expr, tsubst_copy, lookup_template_class, do_type_instantiation, cp_build_qualified_type_real): Likewise. cp_build_qualified_type: Adjust. * class.c (instantiate_type): Adjust parameter. Rename itf_* to tf_*. * call.c (standard_conversion): Rename itf_* to tf_*. (reference_binding): Likewise. (convert_like_real): Likewise. * cvt.c (cp_convert_to_pointer): Likewise. (convert_to_reference): Likewise. * decl.c (lookup_namespace_name): Use tf_* flags. (make_typename_type): Likewise. (grokdeclarator): Likewise. * pt.c (convert_nontype_argument): Adjust COMPLAIN usage. (coerce_template_template_parms, convert_template_argument, coerce_template_parms, maybe_get_template_decl_from_type_decl, lookup_template_class, tsubst_friend_function, tsubst_friend_class, instantiate_class_template, tsubst_template_arg_vector, tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument, tsubst_decl, tsubst_arg_types, tsubst_function_type, tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr, instantiate_template, fn_type_unification, resolve_overloaded_unification, verify_class_unification, unify, get_bindings_real, do_type_instantiation, regenerate_decl_from_template, instantiate_decl, tsubst_initializer_list, tsubst_enum, get_mostly_instantiated_function_type, invalid_nontype_parm_type_p): Likewise. * tree.c (cp_build_qualified_type_real): Likewise. * typeck.c (build_binary_op): Rename itf_* to tf_*. (build_ptrmemfunc): Likewise. (convert_for_assignment): Likewise. From-SVN: r49591
Nathan Sidwell committed -
cp: PR c++/109 * decl.c (grokdeclarator): Allow friend declarations from dependant types. * decl2.c (handle_class_head): Don't push into template parm contexts. * pt.c (push_template_decl_real): Template parm contexts are never being defined. testsuite: * g++.dg/template/friend4.C: New test. From-SVN: r49589
Nathan Sidwell committed
-
- 05 Feb, 2002 2 commits
-
-
* class.c: Include target.h. (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY, BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS bit-field layout. * Make-lang.in: Adjust deps. From-SVN: r49527
Alexandre Oliva committed -
From-SVN: r49505
Jason Merrill committed
-
- 04 Feb, 2002 4 commits
-
-
* c-common.def (SWITCH_STMT): Add SWITCH_TYPE operand. * c-common.h (SWITCH_TYPE): Define. * c-typeck.c (c_start_case): Set SWITCH_TYPE. * stmt.c (all_cases_count): Set lastval to thisval at end of loop. Rename spareness variable to sparseness. (expand_end_case_type): Renamed from expand_end_case, use orig_type if non-NULL instead of TREE_TYPE (orig_index). * tree.h (expand_end_case_type): Renamed from expand_end_case. (expand_end_case): Define using expand_end_case_type. * c-semantics.c (genrtl_switch_stmt): Pass SWITCH_TYPE to expand_end_case_type. * doc/c-tree.texi (SWITCH_STMT): Document SWITCH_TYPE. * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE. (finish_switch_cond): Set SWITCH_TYPE. * gcc.dg/Wswitch.c: Fix typos. Don't return unconditionally before all tests. Move warning one line above to match where it C frontend emits. * gcc.dg/Wswitch-2.c: New test. * g++.dg/warn/Wswitch-1.C: New test. * g++.dg/warn/Wswitch-2.C: New test. From-SVN: r49497
Jakub Jelinek committed -
* config/alpha/alpha.c (current_function_is_thunk): Don't check current_function_is_thunk. (alpha_sa_mask): Distinguish between current_function_is_thunk called from ASM_OUTPUT_MI_THUNK and not. (alpha_does_function_need_gp): Thunks always need gp. (alpha_start_function, alpha_output_function_end_prologue): Likewise. (alpha_output_mi_thunk_osf): New. * config/alpha/alpha-protos.h: Update. * config/alpha/alpha.h (ASM_OUTPUT_MI_THUNK): New. cp/ * method.c (use_thunk): Always initialize the block tree. Reindent. * semantics.c (expand_body): Emit thunks after function, not before. From-SVN: r49484
Richard Henderson committed -
* decl.c (start_function): Call cplus_decl_attributes immediately after grokdeclarator. * decl.c (start_function): Combine DECL_RESULT handling code. From-SVN: r49480
Jason Merrill committed -
* xref.c: Remove. * Make-lang.in (CXX_OBJS): Remove cp/xref.o (cp/xref.o): Remove dependencies. * class.c (finish_struct_1, check_methods): Don't call xref fns. (finish_struct_1): Likewise. * friend.c (make_friend_class): Likewise. * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise. * spew.c (read_process_identifier): Likewise. From-SVN: r49472
Jason Merrill committed
-
- 01 Feb, 2002 7 commits
-
-
From-SVN: r49408
Jason Merrill committed -
PR c++/4872 * decl.c (finish_function): Warn about a non-void function with no return statement and no abnormal exit. * cp-tree.h (struct cp_language_function): Add returns_abnormally. (current_function_returns_abnormally): New macro. * call.c (build_call): Set it. From-SVN: r49407
Jason Merrill committed -
* typeck.c (build_component_ref): Always complain about offsetof constructs on non-PODs. Only make it an error for members of virtual bases. From-SVN: r49406
Jason Merrill committed -
From-SVN: r49397
Jason Merrill committed -
* error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS. (dump_function_decl): Always dump parms. From-SVN: r49396
Jason Merrill committed -
* decl2.c (finish_static_data_member_decl): Complain about a local class with a static data member. PR c++/4286 * search.c (lookup_field_1): Don't xref a static data member just because we looked it up. From-SVN: r49395
Jason Merrill committed -
* Makefile.in (c-parse.c): Handle .output file. * objc/Make-lang.in (objc-parse.c): Likewise. * cp/Make-lang.in (parse.c): Handle .output file. From-SVN: r49393
Jason Merrill committed
-
- 31 Jan, 2002 2 commits
-
-
PR c++/3395 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES, not TREE_TYPE. * semantics.c (finish_class_definition): Adjust. From-SVN: r49380
Jason Merrill committed -
* parse.y (named_parm): Don't strip attrs. (declmods): Remove 'attributes' production. (nonempty_cv_qualifiers): Accept attributes. (ATTRIBUTE): Give precedence. * decl.c (groktypename): Handle attributes. (grokparms): Likewise. From-SVN: r49373
Jason Merrill committed
-
- 29 Jan, 2002 2 commits
-
-
PR other/1502: * cppinit.c (cpp_handle_option): Add ignore argument, if it is zero, don't ignore unrecognized -W* options. (cpp_handle_options): Pass 1 as last argument to cpp_handle_option. * cpplib.h (cpp_handle_option): Adjust prototype. * c-decl.c (c_decode_options): Pass 0 as last argument to cpp_handle_option. PR c/2896: * gcc.c (cpp_unique_options): Split from cpp_options. (cpp_options): Source cpp_unique_options. (default_compilers): Use cpp_unique_options instead of cpp_options when used together with cc1_options. (static_specs): Add cpp_unique_options. * objc/lang-specs.h: Use cpp_unique_options instead of cpp_options when used together with cc1_options. * decl2.c (cxx_decode_option): Pass 0 as last argument to cpp_handle_option. * lang-specs.h: Use cpp_unique_options instead of cpp_options when used together with cc1_options. From-SVN: r49315
Jakub Jelinek committed -
cp: PR c++/5132 * typeck2.c (digest_init): Make sure non-array core type is instantiated. * decl2.c (reparse_absdcl_as_casts): Just store the type in the constructor, rather than build a new one. (build_expr_from_tree, CONSTRUCTOR case): Be careful with the PURPOSE of constructor elts. testsuite: * g++.dg/template/ctor1.C: Add instantiation. From-SVN: r49314
Nathan Sidwell committed
-
- 24 Jan, 2002 1 commit
-
-
* Make-lang.in (parse.c): Adjust expected number of shift-reduce conflicts. (decl.o): Depend on diagnostic.h. * decl.c: Include diagnostic.h. (grokdeclarator): Check for null pointer. (finish_function): Don't abort when current_binding_level->parm_flag != 1, if errors have occurred; throw away the statement tree and extra binding levels, and continue. * lex.c (note_list_got_semicolon): Check for null pointer. * method.c (hack_identifier): Just return error_mark_node if value is error_mark_node. * parse.y (primary: TYPEID(type_id)): No need to use TYPE_MAIN_VARIANT here. (handler_seq): Accept an empty list of catch clauses and generate a fake handler block to avoid later crashes. (ansi_raise_identifier): Accept the error token too. * semantics.c (begin_class_definition, finish_class_definition): Check for error_mark_node. From-SVN: r49163
Zack Weinberg committed
-
- 23 Jan, 2002 7 commits
-
-
* typeck2.c (friendly_abort): Delete definition. * cp-tree.h (friendly_abort): Don't prototype. (my_friendly_assert): Use fancy_abort. From-SVN: r49152
Zack Weinberg committed -
2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org> * cp-tree.h (my_friendly_abort): Remove. From-SVN: r49149
Craig Rodrigues committed -
* spew.c (pending_inlines, pending_inlines_tail, processing_these_inlines): Make static. (mark_pending_inlines): Remove static. (begin_parsing_inclass_inline): If in function, save pi for GC to cp_function_chain->unparsed_inlines instead. (process_next_inline): Likewise. * cp-tree.h (struct cp_language_function): Add unparsed_inlines. (mark_pending_inlines): Add prototype. * decl.c (spew_debug): Remove unused extern. (mark_lang_function): Call mark_pending_inlines. * g++.dg/other/gc1.C: New test. From-SVN: r49147
Jakub Jelinek committed -
2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org> * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c, init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Change my_fancy_abort() to abort(). From-SVN: r49139
Craig Rodrigues committed -
PR c++/5453 * class.c (fixed_type_or_null): Fix thinko. From-SVN: r49133
Jason Merrill committed -
* tree.c (build1): Don't set TREE_READONLY on INDIRECT_REF. PR c++/3331 * cp/init.c (resolve_offset_ref): Use build_indirect_ref. From-SVN: r49132
Jason Merrill committed -
* function.c (assign_parms): Don't put args of inline functions into registers when not optimizing. * cp/decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'. From-SVN: r49131
Jason Merrill committed
-
- 22 Jan, 2002 2 commits
-
-
* parse.y (function_body): Suppress the block for the outermost curly braces. * decl.c (pushdecl): Don't try to skip it. (begin_function_body): Keep the block we create, not the next one. * init.c (emit_base_init): Don't mess with keep_next_level. From-SVN: r49076
Jason Merrill committed -
From-SVN: r49075
Jason Merrill committed
-
- 19 Jan, 2002 1 commit
-
-
cp: Fix regression introduced with patch for c++/775 * parse.y (class_head_defn): Check for template specializations with a different class-key. testsuite: * g++.dg/template/access1.C: New test. From-SVN: r49016
Nathan Sidwell committed
-
- 17 Jan, 2002 2 commits
-
-
* decl.c (begin_constructor_body, begin_destructor_body): New fns. (begin_function_body): Call them and keep_next_level. * init.c (emit_base_init): Call keep_next_level. * semantics.c (setup_vtbl_ptr): Lose. * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p. (vtbls_set_up_p): Lose. * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init. * method.c (do_build_copy_constructor): Likewise. (synthesize_method): Call finish_mem_initializers. * parse.y (nodecls): Likewise. From-SVN: r48948
Jason Merrill committed -
* error.c (dump_type_suffix): Print the exception specs before recursing. (dump_function_decl): Here, too. * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT. From-SVN: r48947
Jason Merrill committed
-
- 10 Jan, 2002 4 commits
-
-
From-SVN: r48743
Ira Ruben committed -
From-SVN: r48730
Ira Ruben committed -
From-SVN: r48727
Jakub Jelinek committed -
* spew.c (YYCHAR): Uppercase macro parameter and add parenthesis. (YYCODE): Likewise. (NAME): Uppercase macro parameter. From-SVN: r48717
Graham Stott committed
-
- 09 Jan, 2002 2 commits
-
-
From-SVN: r48675
Graham Stott committed -
* semantics.c (FINISH_COND): Uppercase macro paramaters and add parenthesis. From-SVN: r48674
Graham Stott committed
-
- 08 Jan, 2002 1 commit
-
-
From-SVN: r48640
Graham Stott committed
-