aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2003-07-29re PR c++/11131 (Unrelated declaration removes inline flag from function)Jan Hubicka2-2/+8
PR C++/11131 * tree-inline.c (expand_call_inline): Always call inlinable_function_p in !unit-at-a-time mode. From-SVN: r69929
2003-07-29re PR c++/9447 (using Base<T>::member does not work)Nathan Sidwell11-67/+259
cp: PR c++/9447 * decl.c (add_binding): Add bval local variable. (push_class_level_binding): Likewise. Allow a USING_DECL to be pushed. * decl2.c (do_class_using_decl): The type of a using decl is unknown. * parser.c (cp_parser_postfix_expression): Refactor unqualified-id function call lookup code. * pt.c (tsubst): A USING_DECL will have unknown type. (tsubst_copy_and_build): Allow a using decl. (type_dependent_expression_p): A USING_DECL will make it dependent. * semantics.c (finish_member_declaration): Push a dependent using declaration. testsuite: PR c++/9447 * g++.dg/template/using1.C: New test. * g++.dg/template/using2.C: New test. * g++.dg/template/using3.C: New test. * g++.dg/template/using4.C: New test. From-SVN: r69921
2003-07-29string-opt-9.c: strcmp returns int.Alexandre Oliva3-4/+9
* gcc.c-torture/execute/string-opt-9.c: strcmp returns int. * gcc.c-torture/execute/string-opt-10.c: Likewise. From-SVN: r69916
2003-07-29c-decl.c (c_expand_body_1): Use C_DECL_FILE_SCOPE to detect main function.Geoffrey Keating2-1/+6
* c-decl.c (c_expand_body_1): Use C_DECL_FILE_SCOPE to detect main function. From-SVN: r69913
2003-07-29re PR c++/11530 ([unit-at-a-time] inline static function not emitted with -O3)Mark Mitchell5-23/+58
PR c++/11530 * parser.c (cp_parser_postfix_expression): Do not call mark_used. * semantics.c (finish_id_expression): Call mark_used for all declarations. PR c++/11530 * g++.dg/opt/call1.C: New test. From-SVN: r69911
2003-07-29re PR c++/11667 (wider-than-int enums never compare equal to 0)Mark Mitchell15-129/+254
PR c++/11667 * c-common.c (shorten_compare): Take into account differences between C and C++ representation for enumeration types. * tree.h (set_min_and_max_values_for_integral_type): Declare. * stor-layout.c (set_min_and_max_values_for_integral_type): New function, broken out from ... (fixup_signed_type): ... here and ... (fixup_unsigned_type): ... here. PR c++/11667 * call.c (standard_conversion): Allow all integral->enumeral conversions, after marking them as bad. * decl.c (finish_enum): Make sure that all enumerators are properly converted to the underlying type. (build_enumerator): Set DECL_CONTEXT for namespace-scope enumeration types. * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly. (tsubst_enum): Tidy. * Make-lang.in (typeck.o): Depend on convert.h. (class.o): Likewise. (rtti.o): Likewise. * call.c: Include convert.h. (convert_arg_to_ellipsis): Use convert_to_real. * class.c: Include convert.h. (build_base_path): Use convert_to_integer. * rtti.c: Include convert.h. (build_headof): Use convert_to_integer. * typeck.c: Include convert.h. (decay_conversion): Use convert_to_integer. (build_unary_op): Use build_nop. (get_delta_difference): Use convert_to_integer. (build_ptrmemfunc): Avoid unncessary conversions. From-SVN: r69909
2003-07-29Daily bump.GCC Administrator1-1/+1
From-SVN: r69907
2003-07-28c-decl.c: Update commentary, adjust blank lines throughout.Zack Weinberg2-114/+121
* c-decl.c: Update commentary, adjust blank lines throughout. (struct c_scope): Fix indentation. Reorder members so outer-context pointers come first, booleans last. (duplicate_decls, define_label): Use a 'locus' variable for diagnostic locations in a few more places. (warn_if_shadowing): Un-split a conditional that fits on one line. (c_init_decl_processing): No need to clear current_scope and current_function_scope. (start_decl): Merge if/else if statements with same action. (push_parm_decl): Rename old_immediate_size_expand to use save_foo convention; save/restore around entire function. (grokdeclarator): Remove unnecessary braces. From-SVN: r69903
2003-07-28decl2.c (mark_member_pointers): Verify that member pointer points to the ↵Jan Hubicka2-1/+7
function. * decl2.c (mark_member_pointers): Verify that member pointer points to the function. From-SVN: r69902
2003-07-28Wdeclaration-after-statement-1.c, [...]: New tests.Hans-Peter Nilsson3-0/+57
* gcc.dg/Wdeclaration-after-statement-1.c, gcc.dg/Wdeclaration-after-statement-2.c: New tests. From-SVN: r69900
2003-07-28c-parse.in (lineno_stmt_decl_or_labels_ending_decl): Also warn when ↵Hans-Peter Nilsson9-3/+66
warn_declaration_after_statement. * c-parse.in (lineno_stmt_decl_or_labels_ending_decl): Also warn when warn_declaration_after_statement. Call pedwarn_c90, not pedwarn. Correct message: it's "ISO C90", not "ISO C89". * c-common.c (warn_declaration_after_statement): Define. * c-common.h (warn_declaration_after_statement): Declare. * c.opt (Wdeclaration-after-statement): New. * c-errors.c (pedwarn_c90): New function. * c-opts.c (c_common_handle_option) <case OPT_Wdeclaration_after_statement>: New. * c-tree.h (pedwarn_c90): Declare. * doc/invoke.texi (Option Summary): Document -Wdeclaration-after-statement. (Warning Options): Ditto. Co-Authored-By: Michael Culbertson <Michael.J.Culbertson@wheaton.edu> From-SVN: r69899
2003-07-28* i386.md (memory attribute) Avoid accessing uninitialized memoryJan Hubicka2-2/+7
for ishift1 type instructions. From-SVN: r69895
2003-07-28configure.in (--enable-checking): Add fold category.Jakub Jelinek9-12/+292
* configure.in (--enable-checking): Add fold category. (ENABLE_FOLD_CHECKING): Define if requested. * configure: Rebuilt. * config.in: Rebuilt. * doc/install.texi: Document it. * fold-const.c: Include md5.h. [ENABLE_FOLD_CHECKING] (fold): Define to fold_1. [ENABLE_FOLD_CHECKING] (fold, fold_checksum_tree, fold_check_failed, print_fold_checksum): New functions. * fold-const.c (fold): Never modify argument passed to fold, instead change a copy and return it. * convert.c (convert_to_integer): Likewise. testsuite/ * gcc.c-torture/compile/20030725-1.c: New test. From-SVN: r69886
2003-07-2820030505.c: Only run for SPE.Aldy Hernandez2-2/+6
2003-07-28 Aldy Hernandez <aldyh@redhat.com> * gcc.dg/20030505.c: Only run for SPE. Remove definition of opaque type. From-SVN: r69884
2003-07-28cp-tree.h (begin_compound_stmt): No scope arg is a bool.Nathan Sidwell10-57/+68
* cp-tree.h (begin_compound_stmt): No scope arg is a bool. (finish_compound_stmt): Remove no scope arg. * decl.c (register_dtor_fn): Adjust begin_compound_stmt and end_compound_stmt calls. (expand_static_init, begin_destructor_body, begin_function_body, finish_function_body): Likewise. * decl2.c (start_objects, finish_objects, start_static_storage_duration_function, finish_static_storage_duration_function): Likewise. * init.c (begin_init_stmts, finish_init_stmts, construct_virtual_base, build_vec_init): Likewise. * method.c (do_build_assign_ref, synthesize_method): Likewise. * parser.c (cp_parser_compound_statement, cp_parser_implicitly_scoped_statement, cp_parser_already_scoped_statement): Likewise. * pt.c (tsubst_expr): Likewise. * semantics.c (begin_compound_stmt): No scope arg is a bool. (finish_compound_stmt): Remove no scope arg. * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is always dyadic. From-SVN: r69882
2003-07-28treetree.c: Convert remaining K&R prototypes to ISO C90.Andreas Jaeger7-83/+63
treelang: * treetree.c: Convert remaining K&R prototypes to ISO C90. * tree1.c: Likewise. * parse.y: Likewise. * tree-convert.c: Likewise. java: * jvspec.c: Convert to ISO C90 prototypes. From-SVN: r69881
2003-07-28fixinc.svr4: Remove dead code.Nathanael Nerode3-273/+15
* fixinc/fixinc.svr4: Remove dead code. Remove now-unnecessary cleanup of junk after #else and #endif directives. Collapse repeated clauses into for statment. * fixinc/fixincl.sh: GNU C -> GCC. Add usage comment. From-SVN: r69870
2003-07-28Daily bump.GCC Administrator1-1/+1
From-SVN: r69868
2003-07-28c-decl.c (struct c_scope): Remove keep_if_subblocks field.Zack Weinberg2-29/+37
* c-decl.c (struct c_scope): Remove keep_if_subblocks field. (keep_next_if_subblocks): Rename next_is_function_body. (pushlevel): Adjust commentary. Always set ->keep on the outermost level of a function. Don't set ->keep_if_subblocks. (poplevel): Adjust commentary. Don't look at ->keep_if_subblocks. (store_parm_decls): Adjust to match. (finish_function): Adjust to match. Call poplevel with all three arguments zero. From-SVN: r69865
2003-07-27c-decl.c (store_parm_decls_newstyle, [...]): New functions split out of ↵Zack Weinberg2-304/+285
store_parm_decls. * c-decl.c (store_parm_decls_newstyle, store_parm_decls_oldstyle): New functions split out of store_parm_decls. Avoid unnecessary work. Use local variables consistently. (store_parm_decls): Likewise. (finish_function): No need to set functionbody flag on call to poplevel. (struct language_function): Remove scope field. (c_push_function_context, c_pop_function_context): No need to save and restore current_scope. From-SVN: r69862
2003-07-27call.c (standard_conversion): Tweak handling of pointer-to-member types.Mark Mitchell6-7/+31
* call.c (standard_conversion): Tweak handling of pointer-to-member types. * pt.c (tsubst): Correctly qualify pointers-to-data member types. * typeck.c (comp_ptr_ttypes_real): Check qualifiers on pointer-to-data member types. * g++.dg/template/ptrmem6.C: New test. From-SVN: r69855
2003-07-27extend.texi (Deprecated Features): Implicit typename is gone.Nathan Sidwell2-5/+12
* doc/extend.texi (Deprecated Features): Implicit typename is gone. Default args on types is going. From-SVN: r69853
2003-07-27parser.c (cp_parser_type_parameter): Reformat.Nathan Sidwell2-7/+15
* parser.c (cp_parser_type_parameter): Reformat. (cp_parser_parameter_declaration): Deprecate default args where not allowed. From-SVN: r69852
2003-07-27varasm.c (output_constant_def_contents): Use ASM_DECLARE_CONSTANT_NAME if ↵Geoffrey Keating6-19/+65
defined. * varasm.c (output_constant_def_contents): Use ASM_DECLARE_CONSTANT_NAME if defined. * doc/tm.texi (Label Output): Document ASM_DECLARE_CONSTANT_NAME. * config/darwin.h (ASM_DECLARE_OBJECT_NAME): Ensure zero-sized objects get at least one byte to prevent assembler problems. (ASM_DECLARE_CONSTANT_NAME): New. Index: testsuite/ChangeLog * gcc.c-torture/compile/zero-strct-2.c: New test. From-SVN: r69842
2003-07-27Daily bump.GCC Administrator1-1/+1
From-SVN: r69840
2003-07-26* cfns.h: Rebuilt.Nathan Sidwell2-242/+242
From-SVN: r69833
2003-07-26changelogNathan Sidwell1-0/+15
From-SVN: r69831
2003-07-26cp-tree.h (begin_init_stmts, [...]): Remove.Nathan Sidwell3-98/+29
* cp-tree.h (begin_init_stmts, finish_init_stmts): Remove. (begin_global_stmt_expr, finish_global_stmt_expr): Remove. * init.c (begin_init_stmts): Make static. Return is_global value. Always call begin_stmt_expr. (finish_init_stmts): Make static. Add is_global parm. Always building a stmt tree. (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls. (build_vec_init): Likewise. Always building a stmt tree. (expand_default_init): Always building a stmt tree. (get_temp_regvar): Likewise. * semantics.c (begin_global_stmt_expr, finish_global_stmt_expr): Remove. From-SVN: r69830
2003-07-26Makefile.in (ifcvt.o): Depend on target.hJ"orn Rennecke3-2/+11
* Makefile.in (ifcvt.o): Depend on target.h * ifcvt.c (target.h): Include. (if_convert): Don't call mark_loop_exit_edges if we can't modify jumps. From-SVN: r69829
2003-07-26* doc/install.texi (Testing): Adjust required versions of DejaGnu.Gerald Pfeifer2-2/+6
From-SVN: r69817
2003-07-26re PR inline-asm/11676 (operand to volatile asm incorrectly removed)Richard Henderson4-0/+48
PR inline-asm/11676 * cse.c (count_reg_usage): Handle asm_operands properly. From-SVN: r69816
2003-07-26document default arg deprecationsNathan Sidwell1-0/+3
From-SVN: r69815
2003-07-26builtins.def (DEF_FALLBACK_BUILTIN): Delete.Roger Sayle3-95/+63
* builtins.def (DEF_FALLBACK_BUILTIN): Delete. (DEF_EXT_FALLBACK_BUILTIN): Delete. (BUILT_IN_BZERO, BUILT_IN_BCOPY, BUILT_IN_BCMP): Declare using the regular DEF_EXT_LIB_BUILTIN macro. (BUILT_IN_FPUTC, BUILT_IN_FPUTS, BUILT_IN_FWRITE): Declare using the regular DEF_LIB_BUILTIN macro. (BUILT_IN_PUTCHAR_UNLOCKED, BUILT_IN_PUTS_UNLOCKED, BUILT_IN_FPUTC_UNLOCKED, BUILT_IN_FPUTS_UNLOCKED, BUILT_IN_FWRITE_UNLOCKED): Declare using the regular DEF_EXT_LIB_BUILTIN macro. * c-decl.c (duplicate_decls): Remove code to handle builtin functions prototyped without an argument list. From-SVN: r69814
2003-07-26winnt.c: Revert 2003-07-08 change.Danny Smith2-14/+28
* config/i386/winnt.c: Revert 2003-07-08 change. (i386_pe_section_type_flags): Remove error_with_decl here too. From-SVN: r69813
2003-07-26pe.c (arm_mark_dllimport): Don't use xxx_with_decl.Gabriel Dos Reis4-7/+17
* config/arm/pe.c (arm_mark_dllimport): Don't use xxx_with_decl. * config/mcore/mcore.c (mcore_mark_dllimport): Likewise. * config/v850/v850.c (v850_handle_data_area_attribute): Likewise. (v850_handle_data_area_attribute): Likewise. From-SVN: r69812
2003-07-26Makefile.in (libbackend.o): Remove options_.h.Geoffrey Keating2-2/+5
* Makefile.in (libbackend.o): Remove options_.h. (mostlyclean): Likewise. From-SVN: r69810
2003-07-26rs6000.c (rs6000_output_function_epilogue): Don't insert a label at the end ↵Geoffrey Keating2-1/+21
of an function under Mach-O. * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Don't insert a label at the end of an function under Mach-O. From-SVN: r69809
2003-07-26* c-decl.c (c_static_assembler_name): Remove TREE_STATIC test.Geoffrey Keating4-1/+32
From-SVN: r69808
2003-07-26Daily bump.GCC Administrator1-1/+1
From-SVN: r69805
2003-07-25rs6000.c (is_ev64_opaque_type): Only check pointer equality.Aldy Hernandez3-8/+13
2003-07-25 Aldy Hernandez <aldyh@redhat.com> * config/rs6000/rs6000.c (is_ev64_opaque_type): Only check pointer equality. (spe_init_builtins): Declare __ev64_opaque__ as a builtin type. * config/rs6000/spe.h: Remove __ev64_opaque__ definition. From-SVN: r69802
2003-07-25* g++.dg/other/error2.C: Tweak expected errors.Nathan Sidwell2-1/+2
From-SVN: r69796
2003-07-25cp-tree.h (build_compound_expr): Take LHS & RHS args.Nathan Sidwell6-135/+96
* cp-tree.h (build_compound_expr): Take LHS & RHS args. (build_x_compound_expr_from_list): Declare. * typeck.c (build_x_compound_expr_from_list): New. (build_x_compound_expr): Adjust. (build_compound_expr): Remove unreachable code. Take two parameters, adjust. * decl.c (grok_reference_init): Use build_x_compound_expr_from_list. (expand_static_init): Adjust build_compound_expr call. (cxx_maybe_build_cleanup): Likewise. * init.c (perform_member_init): Use build_x_compound_expr_from_list. (build_new_1): Likewise. (build_vec_delete): Adjust build_compound_expr calls. (build_vbase_delete): Likewise. * typeck2.c (store_init_value): Use build_x_compound_expr_from_list. (build_functional_cast): Likewise. From-SVN: r69794
2003-07-25cp-tree.h (enum tsubst_flags_t): Add tf_user.Nathan Sidwell5-13/+26
* cp-tree.h (enum tsubst_flags_t): Add tf_user. * decl.c (make_typename_type): Pass it. * pt.c (lookup_template_class): Use it. (resolve_typename_type): Pass it. * semantics.c (finish_template_type): Pass it. From-SVN: r69793
2003-07-25re PR c++/11617 (g++ does not report missing member functions)Nathan Sidwell7-26/+71
cp: PR c++/11617 * cp-tree.h (qualified_name_lookup_error): Declare. * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for errors. (tsubst_expr) <DECL_STMT case>: Likewise. (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise. * semantics.c (qualified_name_lookup_error): New, broken out of ... (finish_id_expression): ... here. Use it. testsuite: PR c++/11617 * g++.dg/template/lookup2.C: New test. * g++.dg/template/memclass1.C: Remove instantiated from error. From-SVN: r69790
2003-07-25* cfns.gperf: Add '%%' delimiter to placate gperf 3.0.Falk Hueffner2-0/+5
From-SVN: r69787
2003-07-25passes.texi (Passes): Mention pretty-printing and diagnostic files.Gabriel Dos Reis2-1/+9
* doc/passes.texi (Passes): Mention pretty-printing and diagnostic files. From-SVN: r69783
2003-07-25* decl.c (force_poplevels): Fix warning call.Nathan Sidwell2-2/+5
From-SVN: r69782
2003-07-25extend.texi (Function Attributes): GNU C++ does now allow unused parameter ↵Nathan Sidwell2-4/+14
decls. * doc/extend.texi (Function Attributes): GNU C++ does now allow unused parameter decls. (Attribute Syntax): GNU C++ does not allow label attributes to be after the ':'. From-SVN: r69781
2003-07-25objc-act.c (objc_check_decl): Don't use xxx_with_decl.Gabriel Dos Reis7-21/+51
* objc/objc-act.c (objc_check_decl): Don't use xxx_with_decl. (objc_declare_class): Likewise. (error_with_ivar): Likewise. (start_class): Likewise. (warn_with_method): Likewise. java/ * expr.c (expand_java_field_op): Don't use xxx_with_decl (expand_java_field_op): Likewise. * class.c (layout_class_method): Likewise (emit_register_classes): Likewise. * decl.c (pushdecl): Likewise. (poplevel): Likewise. (force_poplevels): Likewise. (give_name_to_locals): Likewise. * check-init.c (check_for_initialization): Likewise. From-SVN: r69780
2003-07-25Revert patch for 11617 which accidently crept inNathan Sidwell1-14/+13
From-SVN: r69779