Commit Graph

1199 Commits

Author SHA1 Message Date
Nicola Pero d0f7899abb In gcc/objc/: 2010-12-02 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-12-02  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_build_throw_stmt): Return error_mark_node and
	not NULL_TREE when a @throw is used outside of a @catch block.

In gcc/cp/:
2010-12-02  Nicola Pero  <nicola.pero@meta-innovation.com>

	* parser.c (cp_parser_objc_throw_statement): Use
	cp_parser_expression, not cp_parser_assignment_expression, to
	parse the argument of a @throw.

In gcc/testsuite/:
2010-12-02  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/exceptions-6.m: New.
	* obj-c++.dg/exceptions-6.mm: New.

From-SVN: r167364
2010-12-02 00:25:42 +00:00
Nicola Pero 6c39e757f6 In gcc/c-family/: 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/c-family/:
2010-11-30  Nicola Pero  <nicola.pero@meta-innovation.com>

	* c-common.h (objc_finish_function): New.
	(objc_non_volatilized_type): Removed.
	(objc_type_quals_match): Removed.
	* stub-objc.c (objc_finish_function): New.
	(objc_non_volatilized_type): Removed.
	(objc_type_quals_match): Removed.
	
In gcc/objc/:
2010-11-30  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_build_volatilized_type): Removed.
	(objc_non_volatilized_type): Removed.
	(objc_type_quals_match): Removed.
	(local_variables_to_volatilize): New.
	(objc_volatilize_decl): Add the decl to volatilize to
	local_variables_to_volatilize, but don't volatilize it yet.
	(objc_finish_function): New.
	* objc-act.h (local_variables_to_volatilize): New.

In gcc/cp/:
2010-11-30  Nicola Pero  <nicola.pero@meta-innovation.com>

	* decl.c (finish_function): Call objc_finish_function when
	compiling Objective-C++.
	* call.c (standard_conversion): Do not call
	objc_non_volatilized_type().
	(implicit_conversion): Same change.
	* typeck.c (comp_ptr_ttypes_real): Same change.

In gcc/:
2010-11-30  Nicola Pero  <nicola.pero@meta-innovation.com>

	* c-decl.c (finish_function): Call objc_finish_function in
	Objective-C.
	* c-typeck.c (convert_for_assignment): Do not call
	objc_type_quals_match().

From-SVN: r167318
2010-11-30 21:55:39 +00:00
Nicola Pero 094fd2ddfb Allow 'make check-objc -j2'
2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>
	    Mike Stump  <mikestump@comcast.net>

	Allow 'make check-objc -j2'
	* Make-lang.in (lang_checks_parallelized): New.
	(check_objc_parallelize): New.

Co-Authored-By: Mike Stump <mikestump@comcast.net>

From-SVN: r167277
2010-11-29 23:07:37 +00:00
Nicola Pero 98cf223ca9 In gcc/objc/: 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (start_class): When a class is reimplemented,
	generate an error and avoid adding the class to the list of
	implemented classes again, but do not return error_mark_node.

In gcc/testsuite/:
2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/duplicate-class-1.m: New.
	* obj-c++.dg/duplicate-class-1.mm: New.

From-SVN: r167270
2010-11-29 20:45:49 +00:00
Nicola Pero d402edc15d In gcc/objc/: 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_maybe_build_component_ref): Removed TODO.

In gcc/testsuite/:
2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/property/dotsyntax-21.m
	* obj-c++.dg/property/dotsyntax-21.mm

From-SVN: r167269
2010-11-29 20:43:35 +00:00
Nicola Pero 437c232224 In gcc/objc/: 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_eh_runtime_type): Avoid ICE if error_mark_node
	is passed as argument.
	(objc_begin_catch_clause): Added code to deal with an
	error_mark_node or NULL_TREE argument.  Improved checks for
	invalid arguments.  Added code to traverse typedefs.

In gcc/testsuite/:
2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/exceptions-1.m: New.
	* objc.dg/exceptions-2.m: New.
	* objc.dg/exceptions-3.m: New.
	* objc.dg/exceptions-4.m: New.
	* objc.dg/exceptions-5.m: New.
	* obj-c++.dg/exceptions-1.mm: New.
	* obj-c++.dg/exceptions-2.mm: New.
	* obj-c++.dg/exceptions-3.mm: New.
	* obj-c++.dg/exceptions-4.mm: New.
	* obj-c++.dg/exceptions-5.mm: New.

In gcc/cp/:
2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>

	* parser.c (cp_parser_objc_try_catch_finally_statement): Parse
	@catch(...)  and pass NULL_TREE to objc_begin_catch_clause() in
	that case.  Improved error recovery.  Reorganized code to be
	almost identical to c_parser_objc_try_catch_finally_statement.

In gcc/:
2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>

	* c-parser.c (c_parser_objc_try_catch_statement): Renamed to
	c_parser_objc_try_catch_finally_statement for consistency with the
	C++ parser.  Parse @catch(...) and pass NULL_TREE to
	objc_begin_catch_clause() in that case.  Improved error recovery.
	Reorganized code to be almost identical to
	cp_parser_objc_try_catch_finally_statement.

From-SVN: r167233
2010-11-29 03:15:40 +00:00
Nicola Pero 5944a6dcdf In gcc/objc/: 2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-29  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_demangle): Return immediately if the string is
	too short.  Detect names that do not need demangling, and return
	them unchanged.

From-SVN: r167231
2010-11-29 02:17:24 +00:00
Nicola Pero 2dd24dbdfe In gcc/objc/: 2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented optional properties.
        * objc-act.h (PROPERTY_OPTIONAL): New.
        * objc-act.c (objc_add_property_declaration): Set
        PROPERTY_OPTIONAL if appropriate.
        (finish_class): When generating definitions of setter and getter
        methods associated with a property for a protocol, mark them as
        optional if the property is optional.
        (maybe_make_artificial_property_decl): Added 'getter_name'
        argument.  Set PROPERTY_OPTIONAL.
        (objc_maybe_build_component_ref): Updated calls to
        maybe_make_artificial_property_decl.  Added code for optional,
        readonly properties.
        (objc_build_class_component_ref): Updated call to
        maybe_make_artificial_property_decl.

In gcc/testsuite/:
2010-11-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/property/at-property-24.m: New.
        * objc.dg/property/at-property-25.m: New.
        * obj-c++.dg/property/at-property-24.mm: New.
        * obj-c++.dg/property/at-property-25.mm: New.

From-SVN: r167197
2010-11-27 10:06:59 +00:00
Nicola Pero a693d3a8f5 In gcc/objc/: 2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (objc_build_struct): Fixed loops that save and
        restore TYPE_OBJC_INFO to iterate over all variants of the type; a
        special case for the current type is then no longer required.
        Duplicate TYPE_LANG_SPECIFIC for each type before restoring
        TYPE_OBJC_INFO.
        (objc_get_protocol_qualified_type): Updated comments.

In gcc/testsuite/:
2010-11-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/protocol-qualifier-1.m: New.
        * objc.dg/protocol-qualifier-2.m: New.
        * obj-c++.dg/protocol-qualifier-1.mm: New.
        * obj-c++.dg/protocol-qualifier-2.mm: New.

From-SVN: r167195
2010-11-27 09:53:43 +00:00
Nicola Pero 24e1ee3219 In gcc/objc/: 2010-11-25 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-25  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_build_struct): Install TYPE_OBJC_INTERFACE
	after finish_struct, not before, otherwise it may be wiped out by
	it.  This fixes spurious warnings when a class has more than 15
	instance variables.

In gcc/testsuite/:
2010-11-25  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/ivar-problem-1.m: New.
	* obj-c++.dg/ivar-problem-1.mm: New.

From-SVN: r167151
2010-11-25 19:50:13 +00:00
Nicola Pero 59a09598ca In gcc/objc/: 2010-11-23 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-23  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc/24358
        * lang-specs.h: Added objective-c-cpp-output.  Mapped .mi to
        objective-c-cpp-output instead of objc-cpp-output.  Print a
        deprecation note every time objc-cpp-output is requested.

In gcc/objcp/:
2010-11-23  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc/24358
        * lang-specs.h: Print a deprecation note every time
        objc++-cpp-output is requested.

From-SVN: r167073
2010-11-23 09:47:07 +00:00
Joseph Myers 0576d21f39 common.opt (exit_after_options, [...]): New Variable entries.
* common.opt (exit_after_options, write_symbols, debug_info_level,
	use_gnu_debug_info_extensions): New Variable entries.
	(fprofile-dir=): Use Var.
	* flag-types.h (enum debug_info_level): Rename to enum
	debug_info_levels.
	* flags.h (write_symbols, debug_info_level,
	use_gnu_debug_info_extensions): Remove declarations.
	* opts.c (exit_after_options, write_symbols, debug_info_level):
	Remove.
	(set_struct_debug_option): Make static variables const.
	(use_gnu_debug_info_extensions): Remove.
	(set_debug_level, print_filtered_help, print_specific_help,
	fast_math_flags_set_p): Take gcc_options parameters and use them
	in place of global variables.
	(print_filtered_help): Make new_help non-static.
	(print_specific_help): Update call to print_filtered_help.
	(common_handle_option): Update calls to print_specific_help.  Use
	gcc_options structure for more settings.  Make --help table
	const.  Don't handle OPT_fprofile_dir_ here.  Update calls to
	set_debug_level.
	* toplev.c (profile_data_prefix): Remove.
	* toplev.h (profile_data_prefix, exit_after_options): Remove
	declarations.
	(fast_math_flags_set_p): Update prototype.
	* cppbuiltin.c (define_builtin_macros_for_compilation_flags):
	Update call to fast_math_flags_set_p.

objc:
	* objc-act.c (write_symbols): Don't declare here.

From-SVN: r167064
2010-11-22 23:59:18 +00:00
Nicola Pero d925c9eb81 In gcc/objc/: 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-22  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc/41108
        * objc-act.c (objc_generate_write_barrier): Added assert to make sure
        this function is only called with the next runtime.

From-SVN: r167054
2010-11-22 21:32:49 +00:00
Nicola Pero c3b39f2ee1 Fixed a typo in my ChangeLog entry for 2010-11-06
From-SVN: r166979
2010-11-20 19:20:54 +00:00
Jakub Jelinek fb3303597e re PR c/46547 (internal compiler error when converting a complex to a bool)
PR c/46547
	* objc-act.c (in_late_binary_op): Remove.

From-SVN: r166964
2010-11-20 00:44:47 +01:00
Nicola Pero d4e72c58e3 In gcc/objc/: 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-19  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (objc_start_class_interface): Do not warn that class
        attributes are unimplemented.  Pass the attributes to start_class.
        (objc_start_category_interface): Updated call to start_class.
        (objc_start_class_implementation): Same change.
        (objc_start_category_implementation): Same change.
        (objc_build_class_component_ref): Warn if the class is deprecated.
        (build_private_template): Mark the template as deprecated if the
        class is deprecated.
        (start_class): Added 'attributes' argument.  Emit a warning if
        using a deprecated class as superclass of a class, or original
        class of a category.  Recognize the 'deprecated' attribute when
        starting and interface, and mark the interface with
        TREE_DEPRECATED if present.  Store attributes in the interface.
        
In gcc/testsuite/:
2010-11-19  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/attributes/class-attribute-1.m: Rewritten.
        * objc.dg/attributes/class-attribute-2.m: Same change.
        * obj-c++.dg/attributes/class-attribute-1.mm: Same change.
        * obj-c++.dg/attributes/class-attribute-2.mm: Same change.
        * objc.dg/fobjc-std-1.m: Updated.
        * obj-c++.dg/fobjc-std-1.mm: Updated.

From-SVN: r166963
2010-11-19 22:23:22 +00:00
Nicola Pero 3be0ac864a Fixed email in my last ChangeLog entry
From-SVN: r166940
2010-11-19 12:46:09 +00:00
Nicola Pero 6b192a0972 In gcc/: 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-11-19  Nicola Pero  <nicola.pero@meta-innovation.com>

        * c-parser.c (c_parser_objc_protocol_definition): Pass attributes
        to objc_declare_protocols.

In gcc/c-family/:
2010-11-19  Nicola Pero  <nicola.pero@meta-innovation.com>

        * c-common.h (objc_declare_protocols): Added additional argument.
        * stub-objc.c (objc_declare_protocol): Same change.
        
In gcc/cp/:
2010-11-19  Nicola Pero  <nicola.pero@meta-innovation.com>

        * parser.c (cp_parser_objc_protocol_declaration): Pass attributes
        to objc_declare_protocols.

In gcc/objc/:
2010-11-19  Nicola Pero  <nicola@nicola.brainstorm.co.uk>

        * objc-act.c (lookup_protocol): Added 'warn_if_deprecated'
        argument.  If it is 'true' and the protocol is deprecated, emit a
        deprecation warning.
        (objc_start_protocol): Do not warn that protocol attributes are
        unimplemented.  Pass the attributes to start_protocol.
        (start_protocol): Added attributes argument.  Recognize the
        'deprecated' attribute and mark the protocols with TREE_DEPRECATED
        if present.  Store attributes in the protocol.
        (objc_declare_protocols): Added 'attributes' argument.  Recognize
        the 'deprecated' attribute and mark the protocols with
        TREE_DEPRECATED if present.  Store attributes in the protocol.
        Updated call to lookup_protocol.
        (objc_build_protocol_expr): Updated call to lookup_protocol.
        (check_protocol_recursively): Same change.
        (lookup_and_install_protocols): Same change.
        * objc-act.h: Updated comments.
        
In gcc/testsuite/:
2010-11-19  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/attributes/proto-attribute-1.m: Updated.
        * objc.dg/attributes/proto-attribute-2.m: New.
        * objc.dg/attributes/proto-attribute-3.m: New.
        * obj-c++.dg/attributes/proto-attribute-1.mm: Updated.
        * obj-c++.dg/attributes/proto-attribute-2.mm: New.
        * obj-c++.dg/attributes/proto-attribute-3.mm: New.

From-SVN: r166938
2010-11-19 12:29:45 +00:00
Nicola Pero 354d8ce108 In gcc/objc/: 2010-11-17 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-17  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (lookup_method_in_protocol_list): Search methods in
        PROTOCOL_OPTIONAL_CLS_METHODS / PROTOCOL_OPTIONAL_NST_METHODS if
        they are not found in PROTOCOL_CLS_METHODS / PROTOCOL_NST_METHODS.

In gcc/testsuite/:
2010-11-17  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/protocol-optional-1.m: New.
        * obj-c++.dg/protocol-optional-1.mm: New.

From-SVN: r166847
2010-11-17 01:01:49 +00:00
Nicola Pero b6cfe8acc5 In gcc/objc/: 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (objc_build_setter_call): New.
        (objc_maybe_build_modify_expr): Rewritten to build a compound
        statement.
        (objc_build_incr_expr_for_property_ref): Updated calls to
        objc_maybe_build_modify_expr to call objc_build_setter_call
        instead.  Use build_modify_expr () instead of build2 (MODIFY_EXPR,
        ...).  Use convert () instead of build1 (NOP_EXPR, ...).  Use
        TREE_NO_WARNING on the final compound statement to silence C++
        warnings.

In gcc/testsuite/:
2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/property/dotsyntax-18.m: New.
        * objc.dg/property/dotsyntax-19.m: New.
        * objc.dg/property/dotsyntax-20.m: New.
        * obj-c++.dg/property/dotsyntax-18.mm: New.
        * obj-c++.dg/property/dotsyntax-19.mm: New.     
        * obj-c++.dg/property/dotsyntax-20.mm: New.
        * objc.dg/property/dotsyntax-4.m: Removed some unused variables and code.
        * objc.dg/property/dotsyntax-6.m: Same change.
        * objc.dg/property/dotsyntax-16.m: Same change. 
        * objc.dg/property/dotsyntax-17.m: Same change.
        * obj-c++.dg/property/dotsyntax-4.mm: Same change.
        * obj-c++.dg/property/dotsyntax-6.mm: Same change.
        * obj-c++.dg/property/dotsyntax-16.mm: Same change. 
        * obj-c++.dg/property/dotsyntax-17.mm: Same change.
        * objc.dg/property/at-property-22.m: Added missing casts.
        * obj-c++.dg/property/at-property-22.mm: Same change.

From-SVN: r166779
2010-11-15 23:12:49 +00:00
Nicola Pero 925e8657ce In gcc/: 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>

        * c-typeck.c (build_unary_op): Use
        objc_build_incr_expr_for_property_ref to build the pre/post
        increment/decrement of an Objective-C property ref, and skip the
        lvalue_or_else check in that case.

In gcc/c-family/:
2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>

        * c-common.h (objc_build_incr_expr_for_property_ref): New.
        * stub-objc.c (objc_build_incr_expr_for_property_ref): New.

In gcc/cp/:
2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>

        * typeck.c (cp_build_unary_op): Use
        objc_build_incr_expr_for_property_ref to build the pre/post
        increment/decrement of an Objective-C property ref.

In gcc/objc/:
2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (objc_build_incr_expr_for_property_ref): New.
        (objc_create_temporary_var): Moved it towards the beginning of the
        file so that objc_build_incr_expr_for_property_ref can use it.

In gcc/testsuite/:
2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/property/dotsyntax-16.m: New.
        * objc.dg/property/dotsyntax-17.m: New.
        * obj-c++.dg/property/dotsyntax-16.mm: New.
        * obj-c++.dg/property/dotsyntax-17.mm: New.
        * objc.dg/property/at-property-10.m: Uncommented using 'x++'
        syntax with properties, which now works.
        * obj-c++.dg/property/at-property-10.mm: Same change.

From-SVN: r166763
2010-11-15 18:46:42 +00:00
Nicola Pero 8926bd5d5c In gcc/objc/: 2010-11-14 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-14  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (objc_add_property_declaration): Check that the decl
        we received from the parser is a FIELD_DECL; reject array and
        bitfield properties.  Convert the warning when a property is
        readonly and a setter is specified into an error.  Convert errors
        when a property declaration does not match a property declaration
        in a superclass into warnings.
        (objc_add_synthesize_declaration_for_property): Use
        DECL_BIT_FIELD_TYPE to determine the type of an instance variable
        if it is a bitfield.  Throw an error if we are asked to synthesize
        setters/getters for a bitfield instance variable but the property
        is not appropriate - it must be assign and nonatomic.  If the
        property is readonly, allow the instance variable type to be a
        specialization of the property type.
        (objc_type_valid_for_messaging): Fixed returning 'false' for a
        Class qualified with a protocol when the 'accept_classes' argument
        is 'false'.

In gcc/testsuite/:
2010-11-14  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/property/at-property-21.m: New.
        * objc.dg/property/at-property-22.m: New.
        * objc.dg/property/at-property-23.m: New.       
        * objc.dg/property/synthesize-9.m: New.
        * objc.dg/property/synthesize-10.m: New.
        * objc.dg/property/synthesize-11.m: New.        
        * obj-c++.dg/property/at-property-21.mm: New.
        * obj-c++.dg/property/at-property-22.mm: New.
        * obj-c++.dg/property/at-property-23.mm: New.   
        * obj-c++.dg/property/synthesize-9.mm: New.
        * obj-c++.dg/property/synthesize-10.mm: New.
        * obj-c++.dg/property/synthesize-11.mm: New.    

        * objc.dg/property/at-property-4.m: Updated to match new compiler
        where some errors have been converted into warnings and vice versa.
        * objc.dg/property/at-property-16.m: Same change.
        * objc.dg/property/at-property-18.m: Same change.
        * objc.dg/property/property-neg-5.m: Same change.
        * obj-c++.dg/property/at-property-4.mm: Same change.
        * obj-c++.dg/property/at-property-16.mm: Same change.
        * obj-c++.dg/property/at-property-18.mm: Same change.
        * obj-c++.dg/property/property-neg-5.mm: Same change.
        
        * obj-c++.dg/property/dynamic-2.mm: Enable tests that were
        commented out because of testsuite problems; I found out that
        using dg-warning instead of dg-message gets them to work.
        * obj-c++.dg/property/property-neg-3.mm: Same change.
        * obj-c++.dg/property/synthesize-6.mm: Same change.
        * obj-c++.dg/property/at-property-5.mm: Same change.    
        * obj-c++.dg/property/at-property-14.mm: Same change.   
        * obj-c++.dg/property/at-property-18.mm: Same change.
        * obj-c++.dg/property/at-property-16.mm: Same change (in this file,
        some tests still do not work due to some other testsuite issue).

From-SVN: r166730
2010-11-14 11:11:18 +00:00
Nicola Pero 5a2a6eb050 In gcc/objc/: 2010-11-13 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-13  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (objc_get_protocol_qualified_type): detect cases
        where we are asked to attach a protocol to something which is not
        an Objective-C object type, and produce an error.

In gcc/testsuite/:
2010-11-13  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc/compile/20060406-1.m: Fixed testcase not to try to qualify
        a pointer to an arbitrary C struct with an Objective-C protocol.
        Test various valid uses of typedef with Objective-C objects and
        protocols instead.
        * objc.dg/invalid-type-1.m: New.
        * obj-c++.dg/invalid-type-1.m: New.

From-SVN: r166709
2010-11-13 15:53:32 +00:00
Nicola Pero d6f62adad7 Fixed my email address in 3 of my ChangeLog entries for the past couple of months
From-SVN: r166613
2010-11-11 19:01:45 +00:00
Nicola Pero 10e34e6eb1 In gcc/objc/: 2010-11-11 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-11  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (objc_add_property_declaration): Check that the type
        of a property and of an inherited property match.
        (objc_maybe_build_component_ref): Tidied up indentation and
        comments.
        (objc_common_type): Added new type of check (-5).  If an unknown
        class is involved in a comparison, try to look up its interface.
        (objc_add_synthesize_declaration_for_property): Check that the
        property to synthesize and the instance variable to use have the
        same type.

In gcc/testsuite/:
2010-11-11  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/property/at-property-20.m: New.
        * objc.dg/property/synthesize-8.m: New.
        * obj-c++.dg/property/at-property-20.m: New.
        * obj-c++.dg/property/synthesize-8.mm: New.

From-SVN: r166612
2010-11-11 18:58:43 +00:00
Joseph Myers d8a07487de cfgloop.c (verify_loop_structure): Use %' in diagnostics.
* cfgloop.c (verify_loop_structure): Use %' in diagnostics.  Start
	diagnostics with lowercase letters.
	* cgraphunit.c (verify_cgraph_node): Start diagnostics with
	lowercase letters.
	* collect2.c (maybe_run_lto_and_relink): Remove trailing '.' from
	diagnostic.
	* config/alpha/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic.
	* config/arm/arm.c (arm_get_pcs_model): Start diagnostics with
	lowercase letters.
	* config/arm/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic.
	Remove trailing ' ' from diagnostic.
	* config/avr/avr.c (print_operand_address): Start diagnostic with
	a lowercase letter and remove trailing '.'.
	* config/avr/avr.opt (mpmem-wrap-around): Fix typo in help text.
	* config/bfin/bfin.c (bfin_option_override): Start diagnostics
	with lowercase letters.  Use %' in diagnostics.  Remove trailing
	'.' from diagnostics.
	(bfin_handle_longcall_attribute): Use %' in diagnostic.
	* config/cris/cris.c (cris_split_movdx,
	cris_expand_pic_call_address): Start diagnostics with lowercase
	letters.
	(cris_asm_output_label_ref): Use %' in diagnostic.
	* config/cris/cris.h (ASM_SPEC): Start diagnostic with a lowercase
	letter.
	* config/crx/crx.h (FUNCTION_PROFILER): Start diagnostic with a
	lowercase letter.
	* config/darwin-c.c (version_as_macro): Start diagnostic with a
	lowercase letter.
	* config/darwin-driver.c (darwin_default_min_version): Use %' in
	diagnostic.
	* config/host-darwin.c (darwin_gt_pch_use_address): Use %' in
	diagnostic.
	* config/i386/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic.
	* config/i386/host-cygwin.c (cygwin_gt_pch_get_address): Use %' in
	diagnostics.
	* config/i386/i386.c (ix86_option_override_internal): Write
	diagnostic as a single sentence without trailing '.'.  Use %' in
	diagnostics.
	(ix86_function_sseregparm, classify_argument): Start diagnostics
	with lowercase letters.
	(ix86_expand_prologue): Use %' in diagnostic.
	* config/i386/i386.h (CC1_CPU_SPEC_1): Remove trailing '.' from
	diagnostic.
	* config/i386/nwld.h (LINK_SPEC): Start diagnostic with a
	lowercase letter.
	* config/i386/winnt.c (i386_pe_determine_dllimport_p): Use %' in
	diagnostic.
	* config/ia64/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic.
	* config/ia64/ia64.opt (msched-max-memory-insns-hard-limit): Avoid
	'`' in help text.
	* config/lm32/lm32.c (lm32_print_operand): Start diagnostic with a
	lowercase letter.
	* config/mep/mep.c (mep_validate_vliw): Start diagnostics with
	lowercase letters.
	* config/microblaze/microblaze.c (microblaze_handle_option):
	Remove trailing '.' from diagnostic.
	(print_operand): Start diagnostic with a lowercase letter.
	* config/pa/pa-hpux10.h (LINK_SPEC): Start diagnostics with
	lowercase letters.  Avoid '`' in diagnostics.
	* config/pa/pa-hpux11.h (LINK_SPEC): Start diagnostics with
	lowercase letters.  Avoid '`' in diagnostics.
	* config/pa/pa64-hpux.h (LINK_SPEC): Start diagnostics with
	lowercase letters.  Avoid '`' in diagnostics.
	* config/picochip/picochip.c (picochip_option_override,
	picochip_emit_save_register, picochip_function_arg,
	picochip_output_label, picochip_output_internal_label,
	picochip_asm_output_opcode, picochip_output_cbranch,
	picochip_output_compare, picochip_output_branch,
	picochip_get_vliw_alu_id): Remove trailing '.' and '\n' from
	diagnostics. Start diagnostics with lowercase letters.  Use %' in
	diagnostics.
	* config/rs6000/rs6000.c (rs6000_option_override_internal): Use
	"SPE" capitalization.  Start diagnostic with a lowercase letter.
	(rs6000_handle_option): Start diagnostics with lowercase letters.
	(def_builtin): Remove trailing '.' from diagnostic.
	(rs6000_savres_routine_name): Start diagnostic with a lowercase
	letter.
	* config/rs6000/sysv4.h (LINK_OS_FREEBSD_SPEC): Avoid '`' in
	diagnostic.
	* config/rx/rx.c (rx_handle_option): Start diagnostic with a
	lowercase letter.
	* config/s390/s390.c (s390_option_override) Start diagnostics with
	lowercase letters.  Use %' in diagnostic.
	* config/sh/sh.c (sh_output_mi_thunk): Start diagnostics with
	lowercase letters.
	* config/sh/symbian-base.c (sh_symbian_mark_dllimport): Use %' in
	diagnostic.
	* config/sh/symbian-c.c (sh_symbian_is_dllimported): Use %' in
	diagnostic.
	* config/sh/symbian-cxx.c (sh_symbian_is_dllimported): Use %' in
	diagnostic.
	* config/sparc/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic.
	* config/spu/spu.c (spu_option_override): Start diagnostics with
	lowercase letters.  Use %qs for quoting in diagnostics.
	(spu_check_builtin_parm): Remove trailing '.' from diagnostics.
	Use %wd instead of HOST_WIDE_INT_PRINT_DEC in diagnostic .
	* config/v850/v850.c (construct_save_jarl): Remove trailing '\n'
	from diagnostic.
	* convert.c (convert_to_integer, convert_to_vector): Use %' in
	diagnostics.
	* dbgcnt.c (dbg_cnt_process_opt): Start diagnostic with lowercase
	letter and use "cannot" spelling.
	* expmed.c (extract_fixed_bit_field): Start diagnostic with
	lowercase letter and format as a single sentence without '.'.
	* ggc-common.c (write_pch_globals, gt_pch_save, gt_pch_restore):
	Use %' in diagnostics.
	* ggc-page.c (ggc_pch_write_object, ggc_pch_finish, ggc_pch_read):
	Use %' in diagnostics.
	* ggc-zone.c (ggc_pch_write_object, ggc_pch_finish, ggc_pch_read):
	Use %' in diagnostics.
	* graph.c (clean_graph_dump_file): Use %' in diagnostic.
	* graphite-poly.c (graphite_read_scop_file): Start diagnostics
	with lowercase letters and remove tailing '.' and '\n'.
	* lto-cgraph.c (input_profile_summary): Start diagnostic with
	lowercase letter and remove trailing '.'.
	(input_cgraph): Start diagnostics with lowercase letters and
	remove trailing '\n'.
	* opts.c (finish_options, common_handle_option): Start diagnostics
	with lowercase letters and remove trailing '.'.  Fix typo in
	diagnostic.
	* passes.c (position_pass): Start diagnostic with lowercase
	letter.	
	* plugin.c (add_new_plugin, parse_plugin_arg_opt,
	register_callback, try_init_one_plugin): Start diagnostics with
	lowercase letters.
	* reload1.c (spill_failure): Use %' in diagnostic.
	(gen_reload): Start diagnostic with a lowercase letter.
	* stor-layout.c (place_field): Start diagnostic with a lowercase
	letter.
	* toplev.c (open_auxiliary_file): Use %' in diagnostic.
	* tree-cfg.c (verify_expr, verify_types_in_gimple_reference,
	verify_gimple_call, verify_gimple_phi, verify_eh_throw_stmt_node):
	Start diagnostics with lowercase letters, remove trailing '.' and
	use %' in diagnostics.
	* tree-ssa.c (verify_def): Remove trailing '.' from diagnostic.
	(verify_ssa): Don't split diagnostic across two error calls.
	Spell out "number" and use %' in diagnostic.
	* value-prof.c (visit_hist, check_counter): Start diagnostics with
	lowercase letters.

c-family:
	* c-common.c (handle_mode_attribute): Use %' and word "signedness"
	in diagnostic.
	* c-opts.c (c_common_parse_file): Start diagnostics with lowercase
	letter.
	* c-pragma.c (handle_pragma_target, handle_pragma_optimize):
	Remove trailing '.' from diagnostics.
	* c.opt (Wwrite-strings_: Avoid '`' in help text.

cp:
	* cvt.c (cp_convert_to_pointer): Use %' in diagnostic.
	* decl.c (layout_var_decl, maybe_commonize_var, grokdeclarator):
	Use %' in diagnostics.
	* decl2.c (check_classfn): Use %' in diagnostic.
	* init.c (build_java_class_ref): Use %' in diagnostic.
	(build_delete): Remove trailing '.' from diagnostic.
	* method.c (do_build_copy_assign, walk_field_subobs): Use %' in
	diagnostics.
	* name-lookup.c (pushdecl_maybe_friend): Use %' in diagnostic.
	* parser.c (cp_parser_exception_specification_opt): Remove
	trailing '.' from diagnostic.
	(cp_parser_objc_interstitial_code): Use %qs for quoting in
	diagnostic.
	* pt.c (check_valid_ptrmem_cst_expr): Use %< and %> for quoting in
	diagnostic.
	* repo.c (reopen_repo_file_for_write): Use %' in diagnostic.

fortran:
	* trans-array.c (gfc_trans_deferred_array): Use "front-end"
	spelling in diagnostic.
	* trans.c (gfc_allocate_array_with_status): Add missing space in
	diagnostic.

java:
	* expr.c (expand_java_field_op): Use %' in diagnostic.
	* jcf-parse.c (java_parse_file): Use %' in diagnostics.
	* jvspec.c (lang_specific_driver): Use %' in diagnostic.
	* lang.c (java_post_options): Use %' in diagnostics.

lto:
	* lto.c (lto_resolution_read): Start diagnostics with lowercase
	letters and remove trailing '.'.
	(lto_file_finalize): Start diagnostic with a lowercase letter.

objc:
	* objc-act.c (objc_init): Use %' in diagnostic.
	(objc_set_method_opt): Remove trailing '.' from diagnostic.

From-SVN: r166570
2010-11-10 23:23:15 +00:00
Joseph Myers d547878398 common.opt (flag_excess_precision_cmdline, [...]): New Variable declarations.
* common.opt (flag_excess_precision_cmdline, flag_generate_lto,
	warn_larger_than, larger_than_size, warn_frame_larger_than,
	frame_larger_than_size, flag_gen_aux_info, flag_shlib,
	default_visibility, flag_tls_default): New Variable declarations.
	(aux-info, auxbase, dumpbase, dumpdir, falign-functions=,
	falign-jumps=, falign-labels=, falign-loops=, o, v): Use Var.
	(v): Declare as Common and document here.
	* flags.h (default_visibility, flag_generate_lto,
	warn_larger_than, larger_than_size, warn_frame_larger_than,
	frame_larger_than_size, flag_gen_aux_info, flag_pedantic_errors,
	flag_shlib, flag_excess_precision_cmdline): Remove.
	(set_Wstrict_aliasing): Update prototype.
	* gcc.c (verbose_flag): Remove.
	(driver_handle_option): Add diagnostic_context parameter.  Don't
	handle OPT_v explicitly here.  Set verbose_flag to 1 rather than
	incrementing it.
	* opts-common.c (handle_option): Pass dc to handler.
	* opts.c (warn_larger_than, larger_than_size,
	warn_frame_larger_than, frame_larger_than_size,
	default_visibility): Remove.
	(common_handle_option): Add diagnostic_context parameter.
	(set_fast_math_flags, set_unsafe_math_optimizations_flags): Add
	gcc_options parameters.
	(lang_handle_option, target_handle_option, read_cmdline_options,
	decode_options): Add diagnostic_context parameters.
	(finish_options): Access option state through opts pointer where
	possible.
	(common_handle_option): Access option state through opts pointer
	where possible.  Do not set local static variable verbose.  Do not
	explicitly handle OPT_v, OPT_Wstrict_aliasing_,
	OPT_Wstrict_overflow_, OPT_Wunused, OPT_auxbase, OPT_dumpbase,
	OPT_dumpdir, OPT_falign_functions_, OPT_falign_jumps_,
	OPT_falign_labels_, OPT_falign_loops_, OPT_fira_verbose_, OPT_o or
	OPT_fwhopr_.  Do not explicitly set .opt file variables for
	OPT_aux_info or OPT_pedantic_errors.  Use dc for diagnostic
	context.
	(set_Wstrict_aliasing): Add gcc_options parameter.
	* opts.h (struct cl_option_handler_func): Add diagnostic_context
	parameter to handler.
	(decode_options): Add diagnostic_context parameter.
	* toplev.c (dump_base_name, dump_dir_name, aux_base_name,
	asm_file_name, flag_generate_lto, flag_gen_aux_info,
	aux_info_file_name, flag_shlib, flag_tls_default,
	flag_excess_precision_cmdline, flag_pedantic_errors): Remove.
	(toplev_main): Pass global_dc to decode_options.
	* toplev.h (dump_base_name, dump_dir_name, aux_base_name,
	aux_info_file_name, asm_file_name): Remove.
	* tree.h (flag_tls_default): Remove.

c-family:
	* c-common.c (parse_optimize_options): Pass global_dc to
	decode_options.
	* c-opts.c (c_common_handle_option): Pass &global_options to
	set_Wstrict_aliasing.
	* c.opt (v): Don't mark Common or document here.

fortran:
	* cpp.c (asm_file_name): Don't declare here.

objc:
	* objc-act.c (dump_base_name): Don't declare here.

From-SVN: r166565
2010-11-10 22:35:13 +00:00
Nicola Pero d36dba0739 In gcc/objc/: 2010-11-08 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-08  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (objc_add_dynamic_declaration_for_property): Do not
        search for the @property declation only in the current context,
        but also in inherited properties.  Do not mark the original
        PROPERTY_DECL in the @interface or @protocol with
        PROPERTY_DYNAMIC.
        (check_methods): To check if a method is associated with a
        @dynamic property, search for the property in IMPL_PROPERTY_DECL.
        (check_accessible_methods): Same change.
        * objc-act.h: Updated comment.

In gcc/testsuite/:
2010-11-08  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/property/dynamic-4.m: New.
        * objc.dg/property/dynamic-5.m: New.
        * objc.dg/property/dynamic-6.m: New.    
        * obj-c++.dg/property/dynamic-4.mm: New.
        * obj-c++.dg/property/dynamic-5.mm: New.
        * obj-c++.dg/property/dynamic-6.mm: New.

2010-11-08  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/property/dotsyntax-13.m: New.
        * objc.dg/property/dotsyntax-14.m: New.
        * objc.dg/property/dotsyntax-15.m: New. 
        * objc.dg/property/synthesize-7.m: New.
        * obj-c++.dg/property/dotsyntax-13.mm: New.
        * obj-c++.dg/property/dotsyntax-14.mm: New.
        * obj-c++.dg/property/dotsyntax-15.mm: New.     
        * obj-c++.dg/property/synthesize-7.mm: New.

From-SVN: r166457
2010-11-08 22:38:04 +00:00
Nicola Pero 4741888d03 In gcc/objc/: 2010-11-08 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-08  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (objc_add_synthesize_declaration_for_property):
        Iterate over IMPL_PROPERTY_DECL, not CLASS_PROPERTY_DECL, when
        checking for an existing @synthesize or @dynamic declaration.
        Search for an inherited @property declaration if none is found in
        the local interface.  If the required instance variable does not
        exist, return instead of trying to continue to prevent a compiler
        crash later.  Check that the instance variable is not already
        being used by another @synthesize.
        (objc_add_dynamic_declaration_for_property): Iterate over
        IMPL_PROPERTY_DECL, not CLASS_PROPERTY_DECL, when checking for an
        existing @synthesize or @dynamic declaration.
        (objc_synthesize_getter): Search for the getter declaration in
        protocols and superclasses as well.
        (objc_synthesize_setter): Search for the setter declaration in
        protocols and superclasses as well.

In gcc/testsuite/:
2010-11-08  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/property/synthesize-3.m: New.
        * objc.dg/property/synthesize-4.m: New.
        * objc.dg/property/synthesize-5.m: New.
        * objc.dg/property/synthesize-6.m: New.
        * obj-c++.dg/property/synthesize-3.mm: New.
        * obj-c++.dg/property/synthesize-4.mm: New.
        * obj-c++.dg/property/synthesize-5.mm: New.
        * obj-c++.dg/property/synthesize-6.mm: New.

From-SVN: r166456
2010-11-08 22:04:03 +00:00
Nicola Pero 4ca5d2a7bd In gcc/objc/: 2010-11-08 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-08  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (lookup_property): When checking categories, also
        check the protocols attached to each.
        (objc_add_property_declaration): Determine the
        PROPERTY_SETTER_NAME and PROPERTY_GETTER_NAME here.  Tidied up
        error message.  Search for an existing property declaration with
        the same name which would be inherited from the class hiearchy,
        and produce an error if it has incompatible attributes.
        (check_methods): Changed second parameter.  If the method is a
        getter or setter for a property, do not warn if it is inherited as
        opposed to implemented directly in the class.
        (check_protocol): Updated calls to check_methods.
        (finish_class): Do not determine the PROPERTY_SETTER_NAME and
        PROPERTY_GETTER_NAME here; this is now done earlier, in
        objc_add_property_declaration.
        * objc-act.h (CLASS_NAME, CLASS_SUPER_NAME): Added comments.

In gcc/testsuite/:
2010-11-08  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/property/at-property-5.m: Updated test.       
        * objc.dg/property/at-property-16.m: New.
        * objc.dg/property/at-property-17.m: New.
        * objc.dg/property/at-property-18.m: New.
        * objc.dg/property/at-property-19.m: New.       
        * objc.dg/property/dotsyntax-12.m: New
        * objc.dg/protocol-inheritance-1.m: New.
        * objc.dg/protocol-inheritance-2.m: New.
        * obj-c++.dg/property/at-property-5.mm: Updated test.
        * obj-c++.dg/property/at-property-16.mm: New.
        * obj-c++.dg/property/at-property-17.mm: New.
        * obj-c++.dg/property/at-property-18.mm: New.
        * obj-c++.dg/property/at-property-19.mm: New.   
        * obj-c++.dg/protocol-inheritance-1.mm: New.
        * obj-c++.dg/protocol-inheritance-2.mm: New.
        * obj-c++.dg/property/dotsyntax-12.mm: New.

From-SVN: r166455
2010-11-08 21:47:59 +00:00
Nicola Pero a9625a91d2 In gcc/objc/: 2010-11-05 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-05  Nicola Pero  <nicola.pero@meta-innovation.com>

        Fixed using the Objective-C 2.0 syntax with self and super.
        * objc-act.c (OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS): New.
        (maybe_make_artificial_property_decl): Added 'implementation'
        argument.  Use OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS when
        looking up getters or setters for a class.  If an implementation
        is specified, search it as well for a getter or setter.
        (objc_maybe_build_component_ref): Updated calls to
        maybe_make_artificial_property_decl; added code to deal with
        'self' and 'super' and with methods declared locally in the
        implementation.  Store the getter call expression in the
        PROPERTY_REF instead of throwing it away.
        (objc_build_class_component_ref): Updated calls to
        maybe_make_artificial_property_decl, and store the getter call
        expression in PROPERTY_REF instead of throwing it away.
        (lookup_method_static): Implemented
        OBJC_LOOKUP_NO_INSTANCE_METHODS_OF_ROOT_CLASS option.
        (objc_gimplify_property_ref): Do not build the getter method call
        here; instead use the one stored in the PROPERTY_REF.  If it's not
        there, produce helpful error messages.
        * objc-tree.def (PROPERTY_REF): Increased the number of operands
        from 2 to 3.  Updated comments.
        * objc-act.h (PROPERTY_REF_GETTER_CALL): New.

In gcc/testsuite/:
2010-11-05  Nicola Pero  <nicola.pero@meta-innovation.com>

        Fixed using the Objective-C 2.0 dot-syntax with self and super.
        * objc.dg/property/dotsyntax-5.m: New.
        * objc.dg/property/dotsyntax-6.m: New.
        * objc.dg/property/dotsyntax-7.m: New.
        * objc.dg/property/dotsyntax-8.m: New.
        * objc.dg/property/dotsyntax-9.m: New.
        * objc.dg/property/dotsyntax-10.m: New.
        * objc.dg/property/dotsyntax-11.m: New.
        * obj-c++.dg/property/dotsyntax-5.mm: New.
        * obj-c++.dg/property/dotsyntax-6.mm: New.
        * obj-c++.dg/property/dotsyntax-7.mm: New.
        * obj-c++.dg/property/dotsyntax-8.mm: New.
        * obj-c++.dg/property/dotsyntax-9.mm: New.
        * obj-c++.dg/property/dotsyntax-10.mm: New.
        * obj-c++.dg/property/dotsyntax-11.mm: New.

From-SVN: r166402
2010-11-06 13:14:55 +00:00
Iain Sandoe 91ebb981ec NS/CF String format syntax parsing.
gcc:

	PR target/44981
	* doc/extend.tex (format): Document NSString extension.
	(format_arg): Likewise.
	(Darwin Format Checks): New section.
	* doc/tm.texi: Document string object hooks (generated).
	* doc/tm.texi.in (TARGET_OBJC_CONSTRUCT_STRING_OBJECT) Rename.
	(TARGET_STRING_OBJECT_REF_TYPE_P): New.
	(TARGET_CHECK_STRING_OBJECT_FORMAT_ARG): New.
	* target.def (objc_construct_string_object): Rename, amend 
	documentation.
	(string_object_ref_type_p): New hook.
	(check_string_object_format_arg): New hook.
	* c-parser.c (c_parser_attributes): Allow objective-c class names as
	attribute identifiers.
	* config/darwin-c.c (darwin_cfstring_ref_p): New.
	(darwin_check_cfstring_format_arg): New.
	(darwin_additional_format_types): New.
	* config/darwin-protos.h (darwin_cfstring_ref_p) New.
	(darwin_check_cfstring_format_arg): New.
	* config/darwin.h (TARGET_OBJC_CONSTRUCT_STRING_OBJECT) Renamed.
	(TARGET_STRING_OBJECT_REF_TYPE_P): New.
	(TARGET_N_FORMAT_TYPES): New.
	(TARGET_CHECK_STRING_OBJECT_FORMAT_ARG): New.

gcc/c-family:

	PR target/44981
	* c-format.c (format_type): New type gcc_objc_string_format_type.
	(valid_stringptr_type_p): New.
	(handle_format_arg_attribute): Use valid_stringptr_type_p ().
	(check_format_string): Pass expected type, use 
	valid_stringptr_type_p (), check that the format string types are
	consistent with the format specification.
	(decode_format_attr): Warn if NSString is used outside objective-c.
	(format_types_orig): Add NSString.
	(format_name): New.
	(format_flags): New.
	(check_format_arg): Handle format strings requiring an external parser.
	first_target_format_type: New variable.
	(handle_format_attribute): Set up first_target_format_type, pass the
	expected format arg string type to check_format_string().
	* c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL):  New flag.
	* stub-objc.c (objc_string_ref_type_p): New.
	(objc_check_format_arg): New.

gcc/objc:

	PR target/44981
	* objc-act.c (objc_build_string_object): Amend for renamed hook.
	(objc_string_ref_type_p): New.
	(objc_check_format_arg): New.

gcc/testsuite:

	PR target/44981
	* gcc.dg/darwin-cfstring-format-1.c: New.
	* gcc.dg/warn-nsstring.c: New.
	* objc.dg/fsf-nsstring-format-1.m: New.
	* obj-c++.dg/fsf-nsstring-format-1.mm: New.
	* obj-c++.dg/torture/strings/const-cfstring-1.mm: Update for darwin10
	linker warning.

From-SVN: r166398
2010-11-06 10:48:18 +00:00
Nicola Pero bede2adc26 In gcc/: 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-11-04  Nicola Pero  <nicola.pero@meta-innovation.com>

        Fixed using the Objective-C 2.0 dot-syntax with class names.
        * c-parser.c (c_parser_next_token_starts_declspecs): In
        Objective-C, detect Objective-C 2.0 dot-syntax with a class name.
        (c_parser_next_token_starts_declaration): Same.
        (c_parser_postfix_expression): Parse the Objective-C 2.0
        dot-syntax with a class name.

In gcc/cp/:
2010-11-04  Nicola Pero  <nicola.pero@meta-innovation.com>

        Fixed using the Objective-C 2.0 dot-syntax with class names.
        * parser.c (cp_parser_primary_expression): Recognize Objective-C
        2.0 dot-syntax with class names and process it.
        (cp_parser_nonclass_name): Recognize Objective-C 2.0 dot-syntax
        with class names.
        (cp_parser_class_name): Same change.
        (cp_parser_simple_type_specifier): Tidied comments.

In gcc/c-family/:
2010-11-04  Nicola Pero  <nicola.pero@meta-innovation.com>

        Fixed using the Objective-C 2.0 dot-syntax with class names.
        * c-common.h (objc_build_class_component_ref): New.
        * stub-objc.c (objc_build_class_component_ref): New.

In gcc/objc/:
2010-11-04  Nicola Pero  <nicola.pero@meta-innovation.com>

        Fixed using the Objective-C 2.0 dot-syntax with class names.
        * objc-act.c (objc_build_class_component_ref): New.

In gcc/testsuite/:
2010-11-04  Nicola Pero  <nicola.pero@meta-innovation.com>

        Fixed using the Objective-C 2.0 dot-syntax with class names.
        * objc.dg/property/dotsyntax-3.m: New.
        * objc.dg/property/dotsyntax-4.m: New.
        * obj-c++.dg/property/dotsyntax-3.mm: New.
        * obj-c++.dg/property/dotsyntax-4.mm: New.

        * objc.dg/fobjc-std-1.m: Added test for warnings when the
        Objective-C 2.0 dot-syntax is used with class names.
        * obj-c++.dg/fobjc-std-1.mm: Same change.

From-SVN: r166333
2010-11-04 20:59:47 +00:00
Nicola Pero 9a179d019f In gcc/c-family/: 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/c-family/:
2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>

	* c.opt (Wproperty-assign-default): New option.

In gcc/objc/:
2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_add_dynamic_declaration): Allow @dynamic in a
	category.
	(objc_type_valid_for_messaging): Added 'accept_classes' argument;
	if set to 'true', return 'true' for Class objects.  Do not remove
	more than on pointer indirection.
	(objc_add_property_declaration): Only warn about 'assign'
	semantics for Objective-C objects if warn_property_assign_default;
	and do not warn if the property is readonly or if the type is a Class.
	(objc_finish_foreach_loop): Updated calls to
	objc_type_valid_for_messaging.
	
In gcc/testsuite/:
2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/property/dynamic-2.m: Updated for the fact that @dynamic
	is now allowed in categories.
	* obj-c++.dg/property/dynamic-2.mm: Same change.
	* objc.dg/property/dynamic-3.m: New.
	* obj-c++.dg/property/dynamic-3.mm: New.
	* objc.dg/property/at-property-14.m: New.
	* objc.dg/property/at-property-15.m: New.
	* obj-c++.dg/property/at-property-14.mm: New.
	* obj-c++.dg/property/at-property-15.mm: New.	

	* objc.dg/foreach-6.m: Added a few more tests for valid and
	invalid iterating variables and collections.

From-SVN: r166287
2010-11-03 23:52:18 +00:00
Nicola Pero 22d8d61602 In gcc/: 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented -fobjc-std=objc1 flag.
        * doc/invoke.texi (Option Summary): Document -fobjc-std=objc1
        option.
        * doc/standards.texi (Standards): Updated the section on
        Objective-C; mention support for Objective-C 2.0 features and the
        new -fstd-objc=objc1 flag to disable them.

In gcc/c-family/:
2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented -fobjc-std=objc1 flag.
        * c.opt (fobjc-std=objc1): New option.

In gcc/objc/:
2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented -fobjc-std=objc1 flag.
        * objc-act.c (objc_start_class_interface): If attributes are
        specified when flag_objc1_only is set, print an error.
        (objc_start_category_interface): Same change.
        (objc_start_protocol): Same change.
        (objc_add_method_declaration): Same change.
        (objc_start_method_definition): Same change.
        (objc_build_keyword_decl): Same change.
        (objc_set_method_opt): If flag_objc1_only is set, print an error.
        (objc_add_property_declaration): Same change.
        (objc_add_synthesize_declaration): Same change.
        (objc_add_dynamic_declaration): Same change.
        (objc_finish_foreach_loop): Same change.
        (objc_maybe_build_component_ref): If flag_objc1_only is set,
        return immediately.

In gcc/testsuite/:
2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented -fobjc-std=objc1 flag.
        * objc.dg/fobjc-std-1.m: New.
        * obj-c++.dg/fobjc-std-1.mm: New.

From-SVN: r166246
2010-11-03 13:39:39 +00:00
Nicola Pero 43236c265b In gcc/objc/: 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (maybe_make_artificial_property_decl): New.
        (objc_maybe_build_component_ref): Call
        maybe_make_artificial_property_decl if a property can not be
        found.  Do not call objc_finish_message_expr if
        PROPERTY_HAS_NO_GETTER.
        * objc-act.h Updated comments.
        (PROPERTY_HAS_NO_GETTER): New.
        (PROPERTY_HAS_NO_SETTER): New.
        * objc-tree.def: Updated comment.

In gcc/testsuite/:
2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/property/dotsyntax-1.m: New.
        * objc.dg/property/dotsyntax-2.m: New.
        * obj-c++.dg/property/dotsyntax-1.mm: New.
        * obj-c++.dg/property/dotsyntax-2.mm: New.

From-SVN: r166237
2010-11-03 10:39:15 +00:00
Nicola Pero 2debdb4fcd In gcc/c-family/: 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/c-family/:
2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented format and noreturn attributes for Objective-C methods.
        * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
        attribute for Objective-C methods.

In gcc/objc/:
2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented format and noreturn attributes for Objective-C methods.
        * objc-act.c (objc_start_method_definition): If method attributes
        are specified emit a warning and ignore them.
        (build_objc_method_call): Moved deprecation warnings from here ...
        (objc_finish_message_expr): to here.  Do not emit deprecation
        warnings if the receiver is of type 'id'.
        (really_start_method): Install 'deprecation' and 'noreturn'
        attributes.
        (objc_decl_method_attributes): Carefully filter out the list of
        attributes, allowing only "noreturn", "format", "sentinel" and
        "deprecated".  In the case of "format", adjust the arguments.
        Always process the attributes in the same way no matter if
        "sentinel" is in the list or not.

In gcc/testsuite/:
2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented format and noreturn attributes for Objective-C methods.
        * objc.dg/attributes/method-attribute-2.m: Updated warnings.
        * objc.dg/attributes/method-deprecated-1.m: New.
        * objc.dg/attributes/method-deprecated-2.m: New.
        * objc.dg/attributes/method-deprecated-3.m: New.
        * objc.dg/attributes/method-noreturn-1.m: New.
        * objc.dg/attributes/method-sentinel-1.m: New.
        * objc.dg/attributes/method-format-1.m: New.
        * obj-c++.dg/attributes/method-attribute-2.mm: Updated warnings.
        * obj-c++.dg/attributes/method-deprecated-1.mm: New.
        * obj-c++.dg/attributes/method-deprecated-2.mm: New.
        * obj-c++.dg/attributes/method-deprecated-3.mm: New.
        * obj-c++.dg/attributes/method-noreturn-1.mm: New.
        * obj-c++.dg/attributes/method-sentinel-1.mm: New.
        * obj-c++.dg/attributes/method-format-1.mm: New.

From-SVN: r166153
2010-11-01 22:54:35 +00:00
Nicola Pero 8f78939bbf In gcc/objc/: 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (objc_maybe_build_component_ref): Warn about using
        deprecated properties.
        (objc_maybe_printable_name): Support PROPERTY_DECL.
        
In gcc/testsuite/:
2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/property/at-property-deprecated-1.m: New.
        * obj-c++.dg/property/at-property-deprecated-1.mm: New.

From-SVN: r166147
2010-11-01 21:12:12 +00:00
Nicola Pero 8f07a2aa35 In gcc/objc/: 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented Objective-C 2.0 property accessors. 
        * objc-act.h (enum objc_tree_index): Added OCTI_GET_PROPERTY_DECL,
        OCTI_SET_PROPERTY_DECL, OCTI_COPY_STRUCT_DECL,
        OCTI_GET_PROPERTY_STRUCT_DECL and OCTI_SET_PROPERTY_STRUCT_DECL.
        (objc_getProperty_decl): New.
        (objc_setProperty_decl): New.
        (objc_copyStruct_decl): New.
        (objc_getPropertyStruct_decl): New.
        (objc_setPropertyStruct_decl): New.
        * objc-act.c (build_objc_property_accessor_helpers): New.
        (synth_module_prologue): Call
        build_objc_property_accessor_helpers.
        (lookup_ivar): New.
        (objc_synthesize_getter): Implemented synthesizing getters that
        work with properties that are not nonatomic, assign properties.
        (objc_synthesize_setter): Implemented synthesizing setters that
        work with properties that are not nonatomic, assign properties.

In gcc/testsuite/:      
2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented Objective-C 2.0 property accessors.
        * objc.dg/property/at-property-6.m: Use nonatomic properties to
        avoid testing more complex accessors in this testcase which is not
        about them.
        * objc.dg/property/at-property-7.m: Same change.
        * objc.dg/property/at-property-8.m: Same change.
        * objc.dg/property/at-property-9.m: Same change.
        * objc.dg/property/at-property-10.m: Same change.
        * objc.dg/property/at-property-11.m: Same change.
        * obj-c++.dg/property/at-property-6.mm: Same change.
        * obj-c++.dg/property/at-property-7.mm: Same change.
        * obj-c++.dg/property/at-property-8.mm: Same change.
        * obj-c++.dg/property/at-property-9.mm: Same change.
        * obj-c++.dg/property/at-property-10.mm: Same change.
        * obj-c++.dg/property/at-property-11.mm: Same change.
        * objc.dg/property/at-property-12.m: New.
        * objc.dg/property/at-property-13.m: New.
        * obj-c++.dg/property/at-property-12.mm: New.
        * obj-c++.dg/property/at-property-13.mm: New.

From-SVN: r166143
2010-11-01 20:06:36 +00:00
Nicola Pero 46a88c1221 In gcc/: 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-10-30  Nicola Pero  <nicola.pero@meta-innovation.com>

	Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
	* c-parser.c (c_parser_objc_at_property_declaration): Removed
	parsing of RID_COPIES and RID_IVAR.  Updated call to
	objc_add_property_declaration.
	* c-typecheck.c (build_component_ref): Call
	objc_maybe_build_component_ref instead of objc_build_setter_call.
	Use objc_is_property_ref to improve Objective-C checks.
	(cp_build_modify_expr): Call objc_maybe_build_modify_expr instead
	of objc_build_getter_call.

In gcc/c-family/:
2010-10-30  Nicola Pero  <nicola.pero@meta-innovation.com>

	Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
	* c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
	(objc_add_property_declaration): Removed arguments for copies and
	ivar.
	(objc_build_getter_call): Renamed to
	objc_maybe_build_component_ref.
	(objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
	(objc_is_property_ref): New.
	* c-common.c (c_common_reswords): Removed copies and ivar.
	* stub-objc.c (objc_add_property_declaration): Removed arguments
	for copies and ivar.
	(objc_build_getter_call): Renamed to
	objc_maybe_build_component_ref.
	(objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
	(objc_is_property_ref): New.

In gcc/cp/:
2010-10-30  Nicola Pero  <nicola.pero@meta-innovation.com>

	Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
	* parser.c (cp_parser_objc_at_property_declaration): Removed
	parsing of RID_COPIES and RID_IVAR.  Updated call to
	objc_add_property_declaration.
	* typecheck.c (finish_class_member_access_expr): Call
	objc_maybe_build_component_ref instead of objc_build_setter_call.
	(cp_build_modify_expr): Call objc_maybe_build_modify_expr instead
	of objc_build_getter_call.
	
In gcc/objc/:
2010-10-30  Nicola Pero  <nicola.pero@meta-innovation.com>

	Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
	* objc-tree.def (PROPERTY_REF): New.
	* objc-act.h: Added comments for all the PROPERTY_ macros.
	(PROPERTY_NAME): Use DECL_NAME.
	(PROPERTY_COPIES): Removed.
	(PROPERTY_READONLY): Use DECL_LANG_FLAG_0 for it.
	(PROPERTY_NONATOMIC): New.
	(objc_property_assign_semantics): Make it a typedef.
	(PROPERTY_ASSIGN_SEMANTICS): New.
	(PROPERTY_DYNAMIC): New.
	(PROPERTY_REF_OBJECT): New.
	(PROPERTY_REF_PROPERTY_DECL): New.
	* objc-act.c (CALL_EXPR_OBJC_PROPERTY_GETTER): Removed.
	(in_objc_property_setter_name_context): Removed.
	(objc_add_property_declaration): Removed copies and ivar arguments
	and code supporting them.  Fixed recovering when readonly and
	setter attributes are specified.  Removed support for @property in
	@implementation context.  Updated error message.  Double-check
	that a property does not have a DECL_INITIAL.  Validate the
	property assign semantics and emit appropriate errors and
	warnings.  Check for duplicate property declarations.  Set
	DECL_SOURCE_LOCATION, TREE_DEPRECATED, PROPERTY_NONATOMIC,
	PROPERTY_ASSIGN_SEMANTICS and PROPERTY_DYNAMIC of the new
	PROPERTY_DECL.  Do not set PROPERTY_COPIES.  Set
	PROPERTY_IVAR_NAME to NULL_TREE.
	(objc_build_getter_call): Renamed to
	objc_maybe_build_component_ref.  If the property is not found in
	the interface, search in the protocol list.  Do not generate the
	getter call; instead, build and return a PROPERTY_REF.
	(objc_is_property_ref): New.
	(objc_setter_func_call): Removed.
	(get_selector_from_reference): Removed.
	(is_property): Removed.
	(objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
	Updated to work on a PROPERTY_REF and use the PROPERTY_DECL from
	the PROPERTY_REF.  Generate an error if the property is read-only.
	(build_property_reference): Removed.
	(objc_finish_message_expr): Removed check to produce "readonly
	property can not be set" error when
	in_objc_property_setter_name_context.  We now generate the error
	earlier, in objc_maybe_build_modify_expr, which will only generate
	the setter call if the property is readwrite.
	(check_methods): Recognize dynamic properties.
	(check_methods_accessible): Same change.
	(objc_build_property_ivar_name): Removed.
	(objc_build_property_setter_name): Dropped bool argument.  Always
	add the ':' at the end.
	(objc_gen_one_property_datum): Removed.
	(objc_process_getter_setter): Removed.
	(objc_synthesize_getter): Mark 'klass' argument as unused.  Use
	PROPERTY_GETTER_NAME instead of PROPERTY_NAME.  Set the
	DECL_SOURCE_LOCATION of the new method to be the same as the one
	for the @synthesize.  Always use PROPERTY_IVAR_NAME as it is
	instead of trying to guess what it should be.  Removed use of
	CLASS_IVARS.  Use the location of @synthesize for c_finish_return
	and c_end_compound_statement.
	(objc_synthesize_setter): Mark 'klass' argument as unused.  Use
	PROPERTY_SETTER_NAME instead of trying to guess what it should be.
	Set the DECL_SOURCE_LOCATION of the new method to be the same as
	the one for the @synthesize.  Always use PROPERTY_IVAR_NAME as it
	is instead of trying to guess what it should be.  Removed use of
	CLASS_IVARS.  Use the location of @synthesize for c_finish_return
	and c_end_compound_statement.  Emit an error and keep going,
	instead of aborting, if the setter prototype does not have the
	expected argument.
	(objc_add_synthesize_declaration_for_property): New.
	(objc_add_synthesize_declaration): Removed ATTRIBUTE_UNUSED from
	all arguments.  Improved error message.  Filled in the rest of the
	function, which used to be a placeholder, with an actual
	implementation.
	(objc_add_dynamic_declaration_for_property): New.
	(objc_add_dynamic_declaration): Removed ATTRIBUTE_UNUSED from all
	arguments.  Improved error message.  Filled in the rest of the
	function, which used to be a placeholder, with an actual
	implementation.
	(objc_gen_property_data): Rewritten.
	(finish_class): Added explicit switch cases for
	CLASS_INTERFACE_TYPE, CATEGORY_INTERFACE_TYPE and
	PROTOCOL_INTERFACE_TYPE.  Added a default switch case which is
	gcc_unreachable.  Rewritten the processing of properties, in
	particular to not synthesize prototypes for getters and setters if
	they already exist and to install the getter and setter names into
	PROPERTY_GETTER_NAME and PROPERTY_SETTER_NAME.  Do not generate
	warnings about setter, getter and ivar property attributes.
	(objc_lookup_ivar): Removed support for properties.
	(objc_gimplify_property_ref): New.
	(objc_gimplify_expr): Use a switch.  In case of a PROPERTY_REF, call
	objc_gimplify_property_ref.

In gcc/testsuite/:
2010-10-30  Nicola Pero  <nicola.pero@meta-innovation.com>

	Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
	* objc.dg/property/property-neg-1.m: Updated for changes in the
	syntax of @property and the implementation of
	@synthesize/@dynamic.
	* objc.dg/property/property-neg-2.m: Same change.
	* objc.dg/property/property-neg-3.m: Same change.
	* objc.dg/property/property-neg-4.m: Same change.
	* objc.dg/property/property-neg-5.m: Same change.
	* objc.dg/property/property-neg-7.m: Same change.
	* objc.dg/property/property-1.m: Same change.	
	* objc.dg/property/synthesize-1.m: Same change.
	* objc.dg/property/at-property-2.m: Same change.
	* objc.dg/property/at-property-4.m: Same change.

	* objc.dg/property/fsf-property-method-acces.m: Updated for
	changes in the syntax of @property and the implementation of
	@synthesize/@dynamic.  Use the same code for GNU and NeXT runtime.
	* objc.dg/property/fsf-property-basic.m: Same change.
	* objc.dg/property/fsf-property-named-ivar.m: Same change.
	
	* objc.dg/property/at-property-5.m: New.
	* objc.dg/property/at-property-6.m: New.
	* objc.dg/property/at-property-7.m: New.
	* objc.dg/property/at-property-8.m: New.
	* objc.dg/property/at-property-9.m: New.
	* objc.dg/property/at-property-10.m: New.	
	* objc.dg/property/at-property-11.m: New.
	* objc.dg/property/synthesize-2.m: New.
	* objc.dg/property/dynamic-2.m: New.

	* obj-c++.dg/property/property-neg-1.mm: Updated for changes in the
	syntax of @property and the implementation of
	@synthesize/@dynamic.
	* obj-c++.dg/property/property-neg-2.mm: Same change.
	* obj-c++.dg/property/property-neg-3.mm: Same change.
	* obj-c++.dg/property/property-neg-4.mm: Same change.
	* obj-c++.dg/property/property-neg-5.mm: Same change.
	* obj-c++.dg/property/property-neg-7.mm: Same change.
	* obj-c++.dg/property/property-1.mm: Same change.	
	* obj-c++.dg/property/synthesize-1.mm: Same change.
	* obj-c++.dg/property/at-property-2.mm: Same change.
	* obj-c++.dg/property/at-property-4.mm: Same change.

	* obj-c++.dg/property/fsf-property-method-acces.mm: Updated for
	changes in the syntax of @property and the implementation of
	@synthesize/@dynamic.  Use the same code for GNU and NeXT runtime.
	* obj-c++.dg/property/fsf-property-basic.mm: Same change.
	* obj-c++.dg/property/fsf-property-named-ivar.mm: Same change.

	* obj-c++.dg/property/at-property-5.mm: New.
	* obj-c++.dg/property/at-property-6.mm: New.	
	* obj-c++.dg/property/at-property-7.mm: New.
	* obj-c++.dg/property/at-property-8.mm: New.
	* obj-c++.dg/property/at-property-9.mm: New.
	* obj-c++.dg/property/at-property-10.mm: New.
	* obj-c++.dg/property/at-property-11.mm: New.
	* obj-c++.dg/property/synthesize-2.mm: New.
	* obj-c++.dg/property/dynamic-2.mm: New.

From-SVN: r166087
2010-10-30 11:22:46 +00:00
Nicola Pero 200290f239 In gcc/: 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        * c-parser.c (c_parser_objc_at_property_declaration): Recognize
        RID_ASSIGN, RID_COPY, RID_RETAIN, RID_READWRITE and RID_NONATOMIC.
        Do not use objc_set_property_attr, but use local variables
        instead.  Detect repeated usage of setter, getter and ivar
        attributes.  Improved error processing when a setter name does not
        end in ':'.  Do not check for CPP_CLOSE_PAREN after we determined
        that the token is a keyword.  Updated call to
        objc_add_property_declaration.

In gcc/cp/:
2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        * parser.c (cp_parser_objc_at_property_declaration): Recognize
        RID_ASSIGN, RID_COPY, RID_RETAIN, RID_READWRITE and RID_NONATOMIC.
        Do not use objc_set_property_attr, but use local variables
        instead.  Detect repeated usage of setter, getter and ivar
        attributes.  Improved error processing when a setter name does not
        end in ':'.  Do not check for CPP_CLOSE_PAREN after we determined
        that the token is a keyword.  Updated call to
        objc_add_property_declaration.

In gcc/c-family/:
2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
        RID_RETAIN, RID_COPY and RID_NONATOMIC.  Updated RID_FIRST_PATTR
        and RID_LAST_PATTR.
        (objc_add_property_declaration): Added additional arguments.
        (objc_property_attribute_kind): Removed.
        (objc_set_property_attr): Removed.
        * c-common.c (c_common_reswords): Added readwrite, assign, retain,
        copy and nonatomic.
        * stub-objc.c (objc_add_property_declaration): Added additional
        arguments.
        (objc_set_property_attr): Removed.
        
In gcc/objc/:
2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (objc_add_property_declaration): Added arguments to
        pass the various property attributes that were parsed with the
        property declaration.  Process arguments to determine the final
        property attributes and produce error messages as appropriate.
        Added temporary code to keep the compiler silent about variables
        set but not used - for new attributes that are only checked but
        have no effect yet.
        (property_readonly): Removed.
        (property_setter): Removed.
        (property_getter): Removed.
        (property_ivar): Removed.
        (property_copies): Removed.     
        (objc_set_property_attr): Removed.
        * objc-act.h (enum property_assign_semantics): New.
        
In gcc/testsuite/:
2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        * obj-c.dg/property/at-property-4.m: New.
        * obj-c++.dg/property/at-property-4.mm: New.
        * obj-c++.dg/property/property-neg-5.m: Updated testcase for
        updates in warning.
        * obj-c++.dg/property/property-neg-5.mm: Updated testcase for
        updates in warning.

From-SVN: r165997
2010-10-27 05:23:08 +00:00
Nicola Pero f614132bc7 In gcc/: 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        * c-parser.c (c_parser_objc_at_property): Renamed to
        c_parser_objc_at_property_declaration.  Updated calls to
        objc_add_property_variable, now objc_add_property_declaration.
        Code rewritten to be much more robust in recovering from syntax
        errors.  Added comments.
        (c_parser_objc_property_attrlist): Removed.
        (c_parser_external_declaration): Updated calls to
        c_parser_objc_at_property, now
        c_parser_objc_at_property_declaration.
        (c_parser_objc_methodprotolist): Same change.

In gcc/c-family/:
2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        * c-common.h (objc_add_property_variable): Renamed to
        objc_add_property_declaration.  Added location argument.
        * stub-objc.c (objc_add_property_variable): Same change.

In gcc/cp/:
2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        * parser.c (cp_parser_objc_property_decl): Renamed to
        cp_parser_objc_struct_declaration.  Return the parsed trees
        instead of calling objc_add_property_variable directly.  Detect
        missing or invalid declspecs.  Implemented attributes.  Do not eat
        the ';' at the end.  Exit loop whenever a non-comma is parsed, not
        just EOF.
        (cp_parser_objc_at_property): Renamed to
        cp_parser_objc_at_property_declaration.  Updated calls to
        objc_add_property_variable, now objc_add_property_declaration, and
        to cp_parser_objc_property_decl, now
        cp_parser_objc_struct_declaration.  Rewritten all code to be more
        robust in dealing with syntax errors, and almost identical to the
        one in c_parser_objc_at_property_declaration.
        (cp_parser_objc_property_attrlist): Removed.
        (cp_parser_objc_method_prototype_list): Updated call to
        cp_parser_objc_at_property.
        (cp_parser_objc_method_definition_list): Same change.
        (cp_parser_objc_class_ivars): Detect a number of invalid
        declarations of instance variables and produce errors when they
        are found.

In gcc/objc/:
2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (objc_add_property_variable): Renamed to
        objc_add_property_declaration.  Added location argument.  Updated
        warnings and errors to use it.  Use error, not fatal_error, if a
        property declaration is found outside an interface or
        implementation context.

In gcc/testsuite/:
2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/property/at-property-1.m: New.
        * objc.dg/property/at-property-2.m: New.
        * objc.dg/property/at-property-3.m: New.
        * objc.dg/ivar-invalid-type-1.m: New.
        * obj-c++.dg/property/at-property-1.mm: New.
        * obj-c++.dg/property/at-property-2.mm: New.
        * obj-c++.dg/property/at-property-3.mm: New.
        * obj-c++.dg/ivar-invalid-type-1.mm: New.
        * objc.dg/property/property-neg-6.m: Updated testcase for updates
        in error reporting.

From-SVN: r165996
2010-10-27 04:37:47 +00:00
Nicola Pero be8cf3b55e In gcc/cp/: 2010-10-24 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/cp/:
2010-10-24  Nicola Pero  <nicola.pero@meta-innovation.com>

        Removed Objective-C++ specific replacement of cxx_printable_name.
        * cp-objcp-common.h: Added LANG_HOOKS_DECL_PRINTABLE_NAME, set
        to cxx_printable_name for both C++ and Objective-C++.
        * cp-lang.h: Removed LANG_HOOKS_DECL_PRINTABLE_NAME.

        * error.c (dump_decl): For Objective-C++, call
        objc_maybe_printable_name here ...
        * tree.c (cxx_printable_name_internal): ... instead of here.
        
In gcc/objcp/:
2010-10-24  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objcp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Do not define.

In gcc/objc/:
2010-10-24  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (objc_build_keyword_decl): Updated comments.  Do not
        emit a warning that method parameter attributes are unimplemented.
        Instead, store them into DECL_ATTRIBUTES of the KEYWORD_DECL.
        (start_method_def): Copy attributes from each KEYWORD_DECL into
        the corresponding PARM_DECL.
        (objc_warn_deprecated_use): Removed.
        (build_objc_method_call): Call warn_deprecated_use, not
        objc_warn_deprecated_use.
        (objc_maybe_printable_name): Do not try to get the identifier name
        of DECLs that we don't recognize.  Immediately return NULL for them.
        (objc_printable_name): Removed C++-specific case, which is no
        longer used.  Updated comments.
        
In gcc/testsuite/:
2010-10-24  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/attributes/method-attribute-2.m: Updated test.  Method
        parameter attributes are now supported.
        * obj-c++.dg/attributes/method-attribute-2.m: Same change.
        * objc.dg/attributes/parameter-attribute-1.m: New test.
        * objc.dg/attributes/parameter-attribute-2.m: New test. 
        * obj-c++.dg/attributes/parameter-attribute-1.m: New test.
        * obj-c++.dg/attributes/parameter-attribute-2.m: New test.

From-SVN: r165896
2010-10-24 02:44:03 +00:00
Nicola Pero b8a1880581 In gcc/cp/: 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/cp/:
2010-10-23  Nicola Pero  <nicola.pero@meta-innovation.com>

        * tree.c (cxx_printable_name_internal): In Objective-C++, call
        objc_maybe_printable_name.

In gcc/objc/:
2010-10-23  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (OBJC_GEN_METHOD_LABEL): Updated comments.
        (objc_demangle): Return NULL if demangling can not be done because
        the string to demangle is not an Objective-C mangled method name.
        Be smarter in demangling method names so that at least for methods
        with no arguments we are able to almost always demangle '_' correctly.
        Updated comments.
        (objc_maybe_printable_name): New.
        (objc_printable_name): Call objc_maybe_printable_name.  If it
        returns NULL, call cxx_printable_name in Objective-C++.

In gcc/testsuite/:
2010-10-23  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/demangle-1.m: New test.
        * obj-c++.dg/demangle-1.mm: New test.
        * obj-c++.dg/demangle-2.mm: New test.
        * obj-c++.dg/demangle-3.mm: New test.

In gcc/c-family/:
2010-10-23  Nicola Pero  <nicola.pero@meta-innovation.com>

        * c-common.h (objc_maybe_printable_name): New.
        * stub-objc.c (objc_maybe_printable_name): New.

From-SVN: r165887
2010-10-23 18:40:39 +00:00
Iain Sandoe 2670598830 CFStrings for Darwin.
gcc:

	Based on the CFString implementation in FSF apple/trunk branch.
	
	* target.def (objc_construct_string): New Hook.
	* doc/tm.texi (objc_construct_string): Document.
	* doc/tm.texi.in (TARGET_OBJC_CONSTRUCT_STRING): New.
	* config/t-darwin: Amend build rules for darwin.o.
	* config/darwin.opt: Add cfstrings flags.
	* config/darwin-c.c: Define __CONSTANT_CFSTRINGS__.
	(darwin_objc_construct_string): New.
	* config/i386/darwin.h (SUBTARGET_INIT_BUILTINS): Define.
	* config/i386/i386.c (ix86_init_builtins): Add SUBTARGET_INIT_BUILTINS.
	* config/darwin-protos.h (darwin_init_cfstring_builtins): New prototype.
	(darwin_fold_builtin): Likewise.
	(darwin_build_constant_cfstring): Likewise.
	(darwin_objc_construct_string): Likewise.
	(darwin_cfstring_p): Likewise.
	(darwin_enter_string_into_cfstring_table): Likewise.
	* config/rs6000/darwin.h (SUBTARGET_INIT_BUILTINS) Update for CFString.
	* config/darwin.c (darwin_running_cxx): New var. 
	(machopic_select_section): Return cfstring_constant_object_section.
	(darwin_override_options): Set darwin_running_cxx.
	(add_builtin_field_decl): New.
	(darwin_init_cfstring_builtins): New.
	(darwin_build_constant_cfstring): New.
	(darwin_fold_builtin): New.
	(cfstring_hash): New.
	(cfstring_eq): New.
	(darwin_enter_string_into_cfstring_table): New.
	* config/darwin-sections.def (cfstring_constant_object_section): New.
	* config/darwin.h (TARGET_FOLD_BUILTIN): Define.
	(TARGET_OBJC_CONSTRUCT_STRING): Define.

gcc/objc:

	Based on the CFString implementation in FSF apple/trunk branch.
	
	* objc/objc-act.c (objc_build_string_object): Handle CFStrings.

From-SVN: r165820
2010-10-22 10:28:57 +00:00
Nicola Pero 50ea58617e objc-act.c (get_objc_string_decl): Use a switch instead of a chain of ifs.
2010-10-21  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (get_objc_string_decl): Use a switch instead of a
        chain of ifs.  Use gcc_unreachable instead of abort.
        (add_objc_string): Same change.
        (generate_protocol_list): Same change - twice.
        (synth_id_with_class_suffix): Same change.
        (build_keyword_selector): Same change - twice.
        (objc_build_message_expr): Same change.
        (objc_build_selector_expr): Same change.
        (check_methods): Same change - and added missing gcc_unreachable
        for default case.
        (check_methods_accessible): Same change - twice, and added missing
        gcc_unreachable for default case in one of them.
        (start_class): Same change - and added missing gcc_unreachable for
        default case.
        (continue_class): Same change.
        (objc_gen_property_data): Same change.
        (finish_class): Same change.
        (encode_type_qualifiers): Added missing gcc_unreachable.
        (encode_type): Small code tidy up to reduce duplicated code.  Use
        gcc_unreachable instead of abort - twice.
        (encode_gnu_bitfield): Use a switch instead of a chain of ifs -
        twice.  Added missing gcc_unreachable for default case - twice.
        (dump_interface): Use a switch instead of a chain of ifs.
        (handle_impent): Same change.

From-SVN: r165803
2010-10-22 08:41:27 +00:00
Nicola Pero 249a82c4c6 In gcc/: 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>

        * parser.c (c_parser_objc_method_type): Mark inline.  Return a
        bool instead of a tree.
        (c_parser_objc_method_decl): Added bool argument.  Updated call to
        objc_build_method_signature.
        (c_parser_objc_method_definition): Do not call
        objc_set_method_type.  Updated calls to c_parser_objc_method_type,
        c_parser_objc_method_decl and objc_start_method_definition.
        (c_parser_objc_methodproto): Do not call objc_set_method_type.
        Updated calls to c_parser_objc_method_type,
        c_parser_objc_method_decl and objc_add_method_declaration.

In gcc/c-family/:
2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>

        * c-common.h (objc_set_method_type): Removed.
        (objc_add_method_declaration): Added boolean argument.
        (objc_start_method_definition): Same change.
        (objc_build_method_signature): Same change.
        * stub-objc.c (objc_set_method_type): Removed.
        (objc_add_method_declaration): Added boolean argument.
        (objc_start_method_definition): Same change.
        (objc_build_method_signature): Same change.

In gcc/cp/:
2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>

        * parser.c (cp_parser_objc_method_type): Mark inline.  Return a
        bool instead of calling objc_set_method_type.
        (cp_parser_objc_method_signature): Updated calls to
        cp_parser_objc_method_type and to objc_build_method_signature.
        (cp_parser_objc_method_prototype_list): Updated calls to
        objc_add_method_declaration.  Use token->type to determine if it
        is a class method or not.
        (cp_parser_objc_method_definition_list): Same change.

In gcc/objc/:
2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.h (objc_inherit_code): Removed.
        * objc-act.c (objc_inherit_code): Removed.
        (objc_set_method_type): Removed.
        (objc_build_method_signature): Added is_class_method argument.
        Use it instead of the global objc_inherit_code variable.
        (objc_add_method_declaration): Same change.
        (objc_start_method_definition): Same change.
        (objc_generate_cxx_ctor_or_dtor): Updated call to
        objc_start_method_definition.  Do not call objc_set_method_type.
        (adjust_type_for_id_default): Mark as inline.
        (objc_synthesize_getter): Updated call to
        objc_start_method_definition.  Do not set objc_inherit_code.
        (objc_synthesize_setter): Updated call to
        objc_start_method_definition.  Do not set objc_inherit_code.

From-SVN: r165741
2010-10-20 22:41:53 +00:00
Nicola Pero 660820d19f [multiple changes]
2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.  Obvious updates
        to gcc_alloc_xxx calls in hash_init and hash_class_name_enter to
        get it to compile in the current trunk.

        2006-01-27 Fariborz Jahanian <fjahanian@apple.com>

        Radar 4345837
        * objc/objc-act.c (hash_class_name_enter): New.
        (hash_class_name_lookup): New.
        (objc_declare_alias): Enter alias name into hash table.
        (objc_declare_class): Enter class name into hash table.
        (objc_is_class_name): Do a hash look up of class name.
        (hash_init): Initialize the two new hash tables.
        * objc-act.h: Added cls_name_hash_list and als_name_hash_list
        declarations, removed class_chain and alias_chain.

From-SVN: r165732
2010-10-20 18:03:43 +00:00
Nicola Pero 977e30bc45 In gcc/: 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>

        * c-decl.c (c_write_global_declarations): Call
        objc_write_global_declarations when compiling Objective-C.
        * c-lang.c (finish_file): Removed.

In gcc/c-family/:
2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>

        * c-common.h (finish_file): Removed.
        (objc_write_global_declarations): New.
        * c-opts.c (c_common_parse_file): Do not call finish_file.
        * stub-objc.c (objc_write_global_declarations): New.

In gcc/cp/:
2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>

        * cp-lang.c (finish_file): Removed.
        * decl2.c (cp_write_global_declarations): Call
        objc_write_global_declarations when compiling Objective-C++.

In gcc/objc/:
2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-lang.c (finish_file): Removed.
        * objc-act.c (objc_finish_file): Renamed to
        objc_write_global_declarations.  Do not try to instantiate C++
        templates when compiling Objective-C++ as this is now
        automatically done before this function is called.  Do not check
        for syntax-only run or PCH generation as this is done by the
        callers.
        * objc-act.h (objc_finish_file): Removed.

In gcc/objcp/:
2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objcp-lang.c (finish_file): Removed.

In gcc/testsuite/:
2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.  Test adapted to
        not require Foundation and run with the GNU runtime as well.

        2006-03-13  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4439126
        * obj-c++.dg/template-8.mm: New.

From-SVN: r165714
2010-10-20 09:08:57 +00:00
Nicola Pero da57d1b98f In gcc/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented parsing @synthesize and @dynamic for Objective-C.
        * c-parser.c (c_parser_external_declaration): Recognize
        RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
        (c_parser_objc_at_synthesize_declaration): New.
        (c_parser_objc_at_dynamic_declaration): New.

2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>

        * c-parser.c (c_parser_objc_class_declaration): After finding an
        error, parse the whole declaration then reset parser->error.

In gcc/cp/:
2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented parsing @synthesize and @dynamic for Objective-C++.
        * parser.c (cp_parser_objc_method_definition_list): Recognize
        RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
        (cp_parser_objc_at_dynamic_declaration): New.
        (cp_parser_objc_at_synthesize_declaration): New.

2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>

        * parser.c (cp_parser_objc_identifier_list): Check the return
        value of cp_parser_identifier and react if it is error_mark_node.

In gcc/objc/:
2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented parsing @synthesize and @dynamic for
        Objective-C/Objective-C++.
        * objc-act.c (objc_add_synthesize_declaration): New.
        (objc_add_dynamic_declaration): New.

2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (lookup_and_install_protocols): Return NULL if passed
        error_mark_node.

In gcc/testsuite/:
2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented parsing @synthesize and @dynamic for
        Objective-C/Objective-C++.
        * objc.dg/property/dynamic-1.m: New.
        * objc.dg/property/synthesize-1.m: New.
        * obj-c++.dg/property/dynamic-1.mm: New.
        * obj-c++.dg/property/synthesize-1.mm: New.

2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/at-class-1.m: New.
        * objc.dg/at-class-1.mm: New.

From-SVN: r165667
2010-10-18 23:28:20 +00:00
Nicola Pero fd4e428acc In gcc/objc/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2006-03-10  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4407151
        * objc/objc-act.c (objc_is_class_name): template parameter is not
        an objective class name.
        (objc_generate_cxx_cdtors): Check for the null
        objc_implementation_context.

In gcc/testsuite/:
2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2006-01-17  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4407151
        * obj-c++.dg/template-7.mm: New.

From-SVN: r165657
2010-10-18 18:54:01 +00:00
Nicola Pero e426b47b65 In gcc/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.
        * c-parser.c (c_parser_typeof_specifier): Adapted to new parser
        the following Objective-C change:

        2005-10-07  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4204796
        * c-parse.in (typespec_nonreserved_nonattr): Remove volatile from
        'volatilized' type used in a typeof operator.

In gcc/c-family/:
2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.
        
        2005-11-08  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4330422
        * c-common.h (objc_non_volatilized_type): New declaration
        * stub-objc.c (objc_non_volatilized_type): New stub.

In gcc/cp/:
2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
        
        Merge from apple/trunk branch on FSF servers.
        
        2005-03-01 Fariborz Jahanian <fjahanian@apple.com>

        Radar 4451818
        * call.c (standard_conversion, implicit_conversion): Ignore
        'volatile' attribute of artificially volatized type in objc when
        evaluating various conversion weights.

        2005-11-08  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4330422
        * typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the
        artiificially 'volatized' type before doing pointer comparison.
        
In gcc/objc/:
2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.
        
        2005-11-08  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4330422
        * objc/objc-act.c (objc_non_volatilized_type): New

        2005-10-07  Fariborz Jahanian <fjahanian@apple.com>
        
        Radar 4204796
        * objc-act.c (objc_build_volatilized_type): Build 'volatilzed'
        types with proper attribute set and correctly.
        (objc_volatilize_decl): Remove unneeded code.
        (objc_type_quals_match): Use the new attribute to check on
        'volatilzed' type.
        (hash_init): removed unneeded code.
        
In gcc/testsuite/:
2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
        
        Merge from 'apple/trunk' branch on FSF servers.

        2005-03-01 Fariborz Jahanian <fjahanian@apple.com>

        Radar 4451818
        * obj-c++.dg/try-catch-16.mm: New.
        * obj-c++.dg/try-catch-17.mm: New.

        2005-11-08  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4330422
        * obj-c++.dg/try-catch-15.mm: New

        2005-10-07  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4204796
        * obj-c++.dg/try-catch-12.mm: New
        * obj-c++.dg/try-catch-13.mm: New
        * obj-c++.dg/try-catch-14.mm: New
        * objc.dg/try-catch-11.m: New
        * objc.dg/try-catch-12.m: New
        * objc.dg/try-catch-13.m: New

From-SVN: r165654
2010-10-18 18:06:03 +00:00
Nicola Pero 90fbfdc31a In gcc/: 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2006-03-27 Fariborz Jahanian <fjahanian@apple.com>

        Radar 4133425
        * c-decl.c (undeclared_variable): Issue diagnostic on
        private 'ivar' access.

In gcc/c-family/:
2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2006-03-27 Fariborz Jahanian <fjahanian@apple.com>

        Radar 4133425
        * c-common.h (objc_diagnose_private_ivar): New decl.
        * stub-objc.c (objc_diagnose_private_ivar): New stub.

In gcc/cp/:
2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from apple/trunk branch on FSF servers.

        2006-03-27 Fariborz Jahanian <fjahanian@apple.com>

        Radar 4133425
        * lex.c (unqualified_name_lookup_error): Issue diagnostic
        for private 'ivar' access.

In gcc/objc/:
2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2006-03-27 Fariborz Jahanian <fjahanian@apple.com>

        Radar 4133425
        * objc-act.c (objc_diagnose_private_ivar): New.

In gcc/testsuite/:
2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2006-03-27 Fariborz Jahanian <fjahanian@apple.com>

        Radar 4133425
        * objc.dg/private-1.m: Test modified.
        * obj-c++.dg/private-1.mm: Test modified.

From-SVN: r165601
2010-10-17 21:52:09 +00:00
Iain Sandoe c37d8c307c add parse support for @package to ObjC*
gcc/c-family:
	
	* c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
	* c-common.h (enum rid): Add RID_AT_PACKAGE.
	(objc_ivar_visibility_kind): New enum.
	(objc_set_visibility): Adjust prototype to use visibility enum.
	* stub-objc.c (objc_set_visibility): Adjust stub to use 
	visibility enum.

gcc/objc:

	* objc-act.c: Rename 'objc_public_flag' to  objc_ivar_visibility and
	make its type 'objc_ivar_visibility_kind'.  
	(objc_start_class_interface): Update to use visibility enum.
	(objc_start_class_implementation): Likewise.
	(objc_set_visibility): Update to use visibility enum, warn that 
	@package is handle as per @public.
	(add_instance_variable): Handle OBJC_IVAR_VIS_PACKAGE.
	* objc-act.h: Rename 'objc_public_flag' to  objc_ivar_visibility and
	make its type 'objc_ivar_visibility_kind'.

gcc/cp:

	* parser.c (cp_parser_objc_visibility_spec): Update to use visibility 
	enum, and handle @package.

gcc:

	* c-parser.c (c_parser_objc_class_instance_variables): Update to use 
	visibility enum, and handle @package.

gcc/testsuite:

	* objc.dg/fsf-package-0.m: New.
	* obj-c++.dg/fsf-package-0.m: New.

From-SVN: r165585
2010-10-17 13:02:07 +00:00
Iain Sandoe 668ea4b110 add @property to ObjC*
merge from FSF apple 'trunk' branch. 
	2006 Fariborz Jahanian <fjahanian@apple.com>
	
	Radars 4436866, 4505126, 4506903, 4517826

gcc/c-family: 

	* c-common.c (c_common_resword): Define @property and its attributes.
	* c-common.h: Define property attribute enum entries.
	(OBJC_IS_PATTR_KEYWORD): New.
	(objc_property_attribute_kind): New enum.
	Declare objc_set_property_attr (), objc_add_property_variable (),
	objc_build_getter_call () and objc_build_setter_call ().
	* stub-objc.c (objc_set_property_attr): New stub.
	(objc_add_property_variable): Likewise.
	(objc_build_getter_call): Likewise.
	(objc_build_setter_call) Likewise.

gcc:

	* c-parser.c (c_parser, objc_property_attr_context) New flag.
	(c_lex_one_token): Handle property attributes.
	(c_parser_external_declaration): Handle @property.
	(c_parser_declaration_or_fndef): Warn on invalid attributes before
	@alias, @class, @end and @property objc keywords.
	(c_parser_objc_methodprotolist): Handle @property.
	(c_parser_objc_property_attrlist): New.
	(c_parser_objc_at_property): New.
	* c-typeck.c (build_component_ref): Handle CLASS.property syntax.
	(build_modify_expr): Likewise.

gcc/cp:

	* typeck.c (finish_class_member_access_expr): Handle CLASS.property
	syntax. 
	(cp_build_modify_expr): Likewise.
	* parser.c (cp_parser_objc_method_prototype_list): Handle @property.
	(cp_parser_objc_method_definition_list): Likewise.
	(cp_parser_objc_property_decl): New.
	(cp_parser_objc_property_attrlist): New.
	(cp_parser_objc_at_property): New.

gcc/objc:

	* objc-act.c (CALL_EXPR_OBJC_PROPERTY_GETTER): New.
	property_readonly, property_getter, property_setter, property_ivar,
	property_copies, in_objc_property_setter_name_context: New vars.
	(objc_set_property_attr): New.
	(objc_add_property_variable): New.
	(lookup_property_in_list): New.
	(lookup_property): New.
	(objc_build_getter_call): New.
	(objc_setter_func_call): New.
	(get_selector_from_reference): New.
	(objc_build_setter_call): New.
	(is_property): New.
	(build_property_reference): New.
	(objc_finish_message_expr): Detect readonly property and warn.
	(objc_build_property_ivar_name): New.
	(objc_build_property_setter_name): New.
	(objc_gen_one_property_datum): New.
	(objc_process_getter_setter): New.
	(objc_synthesize_getter): New.
	(objc_synthesize_setter): New.
	(objc_gen_property_data): New.
	(finish_class): Generate property data.
	(comp_proto_with_proto): Separated from ...
	(match_proto_with_proto): ... New.
	(objc_lookup_ivar): Handle properties.
	* objc-tree.def (PROPERTY_DECL): New tree code.
	* objc-act.h: CLASS_LANG_SLOT_ELTS, PROTOCOL_LANG_SLOT_ELTS update size.
	(METHOD_PROPERTY_CONTEXT): New.
	(PROPERTY_NAME): New.
	(PROPERTY_GETTER_NAME): New.
	(PROPERTY_SETTER_NAME): New.
	(PROPERTY_IVAR_NAME): New.
	(PROPERTY_READONLY): New.
	(PROPERTY_COPIES): New.
	(TOTAL_CLASS_RAW_IVARS): New.
	(CLASS_PROPERTY_DECL): New.
	(IMPL_PROPERTY_DECL): New.
	* objc-lang.c (objc_init_ts): Update fields for property_decl.

gcc/objcp:

	* objcp-lang.c (objcxx_init_ts): Update for property_decl.

From-SVN: r165479
2010-10-14 20:09:41 +00:00
Richard Henderson bde8a146a6 Centralize knowledge of eh personality routines.
From-SVN: r165433
2010-10-13 11:57:31 -07:00
Iain Sandoe a1178b309a implement method attributes.
gcc/c-family:
	merge from FSF apple 'trunk' branch. 
	2006-04-26 Fariborz Jahanian <fjahanian@apple.com>

	Radar 3803157 (method attributes)
	* c-common.c (handle_deprecated_attribute): Recognize
	objc methods as valid declarations.
	* c-common.h: Declare objc_method_decl ().
	* stub-objc.c (objc_method_decl): New stub. 

gcc/objc:
	merge from FSF apple 'trunk' branch. 

	2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
	Radar 3803157 (method attributes)
	* objc/objc-act.h (METHOD_TYPE_ATTRIBUTES): New macro.
	* objc/objc-act.c (objc_decl_method_attributes): New.
	(objc_add_method_declaration): Process method's attribute.
	(objc_start_method_definition): Ditto.
	(build_objc_method_call): Inject method attribute into
	built function type.
	(objc_method_decl): New.
	(objc_warn_deprecated)use): New.

testsuite:
	* objc.dg/attributes/method-attribute-1.m: Update to respond
	to implemented method attributes..
	* objc.dg/attributes/method-attribute-2.m: Likewise.
	* objc.dg/attributes/method-attribute-3.m: Likewise.
	* obj-c++.dg/attributes/method-attribute-1.mm: Likewise.
	* obj-c++.dg/attributes/method-attribute-2.mm: Likewise.
	* obj-c++.dg/attributes/method-attribute-3.mm: Likewise.

From-SVN: r165415
2010-10-13 08:24:48 +00:00
Andi Kleen d6d5951a4a Build compiler checksum from object files v2
gcc/

2010-10-07  Andi Kleen  <ak@linux.intel.com>

	* Makefile.in (MOSTLYCLEANFILES): Remove cc1*dummy, add
	checksum-options.
	(checksum-options): Add.
	(cc1-dummy): Remove.
	(cc1-checksum): Change to run checksum over object files
	and options only.
	* dummy-checksum.c: Remove.
	* genchecksum.c: Update copyright.
	(usage): Allow multiple arguments.
	(BLOCKSIZE): Add.
	(dosum): Change for incremental checksum. Remove C output.
	(main): Iterate over all argument files. Add C output.

gcc/cp

2010-10-07  Andi Kleen  <ak@linux.intel.com>

	* Make-lang.in (c++_OBJS): Remove dummy-checksum.o.
	(cc1plus-dummy): Remove.
	(cc1plus-checksum): Change to run checksum over object files
        and options only.

gcc/objc

2010-10-07  Andi Kleen  <ak@linux.intel.com>

	* Make-lang.in (cc1obj-dummy): Remove.
	(cc1obj-checksum): Change to run checksum over object files
        and options only.

gcc/objcp

2010-10-07  Andi Kleen  <ak@linux.intel.com>

	* Make-lang.in (cc1objplus-dummy): Remove.
	(cc1objplus-checksum): Change to run checksum over object files
        and options only.

From-SVN: r165305
2010-10-11 13:06:50 +00:00
Nicola Pero 038d22b6c8 In gcc/: 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-10-07  Nicola Pero  <nicola.pero@meta-innovation.com>

        * doc/objc.texi (Fast enumeration protocol): Mention that
        'unsigned int' can also be used instead of 'unsigned long' in
        countByEnumeratingWithState:objects:count:.

In gcc/objc/:
2010-10-07  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc/45925
        * objc-act.c (objc_finish_foreach_loop): Convert return value of
        countByEnumeratingWithState:objects:count: to long unsigned int.

From-SVN: r165129
2010-10-07 18:37:43 +00:00
Iain Sandoe 7427ba36d5 vec-ify ObjC* build_objc_method_call()
gcc/objc:
	* objc-act.c (build_objc_method_call): Replace calls to 
	build_function_call () with the VEC equivalent.  Construct parameter
	lists as VECs.

From-SVN: r165112
2010-10-07 14:22:27 +00:00
Iain Sandoe fd6510698d do not emit bogus set-not-used warnings for objc* entities used as message receivers.
gcc/objc:
	* objc-act.c (objc_build_message_expr):  Call mark_exp_read () to signal that
	the receiver has been used.
gcc/testsuite:
	* objc.dg/set-not-used-1.m: New
	* obj-c++.dg/set-not-used-1.mm: New.

From-SVN: r165111
2010-10-07 14:05:24 +00:00
Nicola Pero d2ab66aa02 Removed obsolete gcc/objc/README file
From-SVN: r165059
2010-10-06 17:57:29 +00:00
Nicola Pero f05b9d93e9 In gcc/: 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-10-06  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented fast enumeration for Objective-C.
        * c-parser.c (objc_could_be_foreach_context): New.
        (c_lex_one_token): Recognize RID_IN keyword in a potential
        Objective-C foreach context.
        (c_parser_declaration_or_fndef): Added parameter.  Accept
        Objective-C RID_IN keyword as terminating a declaration; in that
        case, return the declaration in the new parameter.
        (c_parser_extenral_declaration): Updated calls to
        c_parser_declaration_or_fndef.
        (c_parser_declaration_or_fndef): Same change.
        (c_parser_compound_statement_nostart): Same change.
        (c_parser_label): Same change.
        (c_parser_objc_methodprotolist): Same change.
        (c_parser_omp_for_loop): Same change.
        (c_parser_for_statement): Detect and parse Objective-C foreach
        statements.
        (c_parser_omp_for_loop): Updated call to check_for_loop_decls().
        * c-decl.c (check_for_loop_decls): Added parameter to allow ObjC
        fast enumeration parsing code to turn off the c99 error but still
        perform checks on the loop declarations.
        * c-tree.h (check_for_loop_decls): Updated declaration.
        * doc/objc.texi: Document fast enumeration.

In gcc/c-family/:
2010-10-06  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented fast enumeration for Objective-C.
        * c-common.h (objc_finish_foreach_loop): New.
        * stub-objc.c (objc_finish_foreach_loop): New.

In gcc/objc/:
2010-10-06  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented fast enumeration for Objective-C.
        * objc-act.c (build_fast_enumeration_state_template): New.
        (TAG_ENUMERATION_MUTATION): New.
        (TAG_FAST_ENUMERATION_STATE): New.
        (synth_module_prologue): Call build_fast_enumeration_state_template() and set up
        objc_enumeration_mutation_decl.
        (objc_create_temporary_var): Allow providing a name to temporary
        variables.
        (objc_build_exc_ptr): Updated calls to
        objc_create_temporary_var().
        (next_sjlj_build_try_catch_finally): Same change.
        (objc_finish_foreach_loop): New.
        * objc-act.h: Added OCTI_FAST_ENUM_STATE_TEMP,
        OCTI_ENUM_MUTATION_DECL, objc_fast_enumeration_state_template,
        objc_enumeration_mutation_decl.

        Merge from 'apple/trunk' branch on FSF servers.

        2006-04-12 Fariborz Jahanian <fjahanian@apple.com>

        Radar 4507230
        * objc-act.c (objc_type_valid_for_messaging): New routine to check
        for valid objc object types.
        (objc_finish_foreach_loop): Check for invalid objc objects in
        foreach header.

In gcc/testsuite/:
2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented fast enumeration for Objective-C.
        * objc.dg/foreach-1.m: New.
        * objc.dg/foreach-2.m: New.
        * objc.dg/foreach-3.m: New.
        * objc.dg/foreach-4.m: New.
        * objc.dg/foreach-5.m: New.
        * objc.dg/foreach-6.m: New.
        * objc.dg/foreach-7.m: New.

        Merge from 'apple/trunk' branch on FSF servers:
        2006-04-13 Fariborz Jahanian <fjahanian@apple.com>

        Radar 4502236
        * objc.dg/objc-foreach-5.m: New.

        2006-04-12 Fariborz Jahanian <fjahanian@apple.com>

        Radar 4507230
        * objc.dg/objc-foreach-4.m: New.

        2006-03-13  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4472881
        * objc.dg/objc-foreach-3.m: New.

        2005-03-07 Fariborz Jahanian <fjahanian@apple.com>

        Radar 4468498
        * objc.dg/objc-foreach-2.m: New.

        2006-02-15   Fariborz Jahanian <fjahanian@apple.com>

        Radar 4294910
        * objc.dg/objc-foreach-1.m: New

In libobjc/:
2010-10-06  Nicola Pero  <nicola.pero@meta-innovation.com>

        Implemented fast enumeration for Objective-C.
        * Makefile.in (C_SOURCE_FILES): Added objc-foreach.c.
        (OBJC_H): Added runtime.h
        * objc-foreach.c: New file.
        * objc/runtime.h: New file.

From-SVN: r165019
2010-10-06 10:10:14 +00:00
Nicola Pero a26d886253 In gcc/: 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>

        * c-parser.c (c_parser_objc_method_definition): Updated comment.

In gcc/cp/:
2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc++/31125
        * parser.c (cp_parser_objc_class_interface): If no identifier
        follows an @interface token, stop parsing the interface after
        printing an error.
        (cp_parser_objc_class_implementation): If no identifier follows an
        @implementation token, stop parsing the implementation after
        printing an error.

2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc++/23707
        * parser.c (cp_parser_objc_method_keyword_params): If the required
        colon is not found while parsing parameters, stop parsing them.

2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc++/31126
        * parser.c (cp_parser_objc_class_ivars): Do not eat the EOF or
        @end after detecting it.  Print an error if @end is found without
        a '}'.
        (cp_parser_objc_method_prototype_list): Do not eat the EOF after
        detecting it.  Fixed reading the next token when continuing
        because of an error in a method signature.  Print an error if EOF
        is found without an '@end'.
        (cp_parser_objc_method_definition_list): Same change.

2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from apple/trunk branch on FSF servers:

        2005-10-17  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4290840
        * parser.c (cp_parser_objc_method_keyword_params): Check for valid
        method parameters and issue error.
        (cp_parser_objc_method_definition_list): Check for invalid tokens
        which cannot start a function definition.

        2005-10-14  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4294425
        * parser.c (cp_parser_objc_message_args): Check for missing message
        arguments and syntax error.

        2005-10-13  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4261146
        * parser.c (cp_parser_objc_class_ivars): Check for @end/eof while
        looking for '}'.

        2005-08-15  Ziemowit Laski  <zlaski@apple.com>

        Radar 4093475
        * parser.c (cp_parser_objc_interstitial_code): Catch stray
        '{' and '}' tokens and issue appropriate errors.

        2005-08-02  Ziemowit Laski  <zlaski@apple.com>

        Radar 4185810
        (cp_parser_statement_seq_opt): In addition to '}' and
        end-of-file, a statement sequence may also be terminated
        by a stray '@end'.

In gcc/objc/:
2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2005-10-17  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4290840
        * objc-act.c (objc_start_method_definition): Check for error_mark_node for
        the selector name and make a quick exit.

In gcc/testsuite/:
2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc++/28050
        * obj-c++.dg/syntax-error-10.mm: New.

2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc++/23707
        * obj-c++.dg/syntax-error-9.mm: New.

2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc++/31126
        * obj-c++.dg/syntax-error-8.mm: New.

2010-10-05  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2005-10-17  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4290840
        * obj-c++.dg/syntax-error-7.mm: New

        2005-10-14  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4294425
        * obj-c++.dg/syntax-error-6.mm: New

        2005-10-13  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4261146
        * obj-c++.dg/syntax-error-5.mm: New

        2005-08-15  Ziemowit Laski  <zlaski@apple.com>

        Radar 4093475
        * obj-c++.dg/syntax-error-[3-4].mm: New.

        2005-08-02  Ziemowit Laski  <zlaski@apple.com>

        Radar 4185810
        * obj-c++.dg/syntax-error-[1-2].mm: New.

From-SVN: r164997
2010-10-05 19:23:33 +00:00
Andi Kleen a90163e973 Mark linker Makefile rules for job server build
-fwhopr=jobserver requires telling GNU make that the linker (= lto)
rules support job server, so that the necessary jobserver
information is passed through.

Add + to all the executable targets that run LTO for this purpose.

This improves build performance with a -fwhopr=jobserver
bootstrap (or BUILD_CONFIG=bootstrap-lto) significantly.

I didn't change Ada because that apparently doesn't support LTO.

Passes bootstrap and test suite. Ok to commit?

gcc/

2010-10-04  Andi Kleen <ak@linux.intel.com>

	* Makefile.in (xgcc, cpp, cc1, collect2, lto-wrapper, gcov,
        gcov-dump, cc1-dummy, genprog, build/gcov-iov):
        Add + to build rule.

gcc/cp/

2010-10-04  Andi Kleen <ak@linux.intel.com>

	* Make-lang.in (g++, cc1plus): Add + to build rule.

gcc/fortran/

2010-10-04  Andi Kleen <ak@linux.intel.com>

	* Make-lang.in (gfortran, f951): Add + to build rule.

gcc/java/

2010-10-04  Andi Kleen <ak@linux.intel.com>

	* Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
        Add + to build rule.

gcc/lto/

2010-10-04  Andi Kleen <ak@linux.intel.com>

	* Make-lang.in (lto1): Add + to build rule.

gcc/objc/

2010-10-04  Andi Kleen <ak@linux.intel.com>

	* Make-lang.in (cc1obj-dummy, cc1obj): Add + to build rule.

gcc/objcp/

2010-10-04  Andi Kleen <ak@linux.intel.com>

	* Make-lang.in (cc1objplus-dummy, cc1objplus): Add + to build rule.

More plus fixes

From-SVN: r164949
2010-10-04 17:09:45 +00:00
Iain Sandoe 92902b1baf add @optional/@required to prto lists
add @optional/@required to prto lists
gcc:

	* c-parser.c (c_parser_objc_methodprotolist): Amend preceding comment,
	parse @optional/@required and set the flags as appropriate.

gcc/c-family:

      * c-common.c: Add two new entries for @optional
       and @required keywords.

	merge from FSF 'apple/trunk' branch.
	2006-01-30  Fariborz Jahanian <fjahanian@apple.com>

       Radar 4386773
       * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
       objective-c keywords.
       (objc_set_method_opt): New declaration.
       * stub-objc.c (objc_set_method_opt): New stub.

gcc/cp:

	merge from FSF 'apple/trunk' branch.
	2006-01-30  Fariborz Jahanian <fjahanian@apple.com>

	Radar 4386773
	* cp/parser.c (cp_parser_objc_interstitial_code): For
       @optional/@required set the optional/required flag.

gcc/objc:

	merge from FSF 'apple/trunk' branch.
	2006-01-30  Fariborz Jahanian <fjahanian@apple.com>

       Radar 4386773
       * objc/objc-act.c (objc_set_method_opt): New function.
       (objc_start_protocol, objc_finish_interface): Reset
       objc_method_optional_flag flag.
       (objc_add_method_declaration): Pass on the new
       flag to objc_add_method.
       (objc_add_method): Add optional methods to new chain in
       the protocol class.
       * objc/objc-act.h (CLASS_OPTIONAL_CLS_METHODS,
       CLASS_OPTIONAL_NST_METHODS): New macros accessing a protocol
       class's optional method chains.

testsuite:

	merge from FSF 'apple/trunk' branch.
	2006-01-30  Fariborz Jahanian <fjahanian@apple.com>

       Radar 4386773
       * objc.dg/enhanced-proto-1.m: New.
       * objc.dg/enhanced-proto-2.m: New.
       * obj-c++.dg/enhanced-proto-1.mm: New
       * obj-c++.dg/enhanced-proto-2.mm: New.

From-SVN: r164754
2010-09-30 16:51:00 +00:00
Nicola Pero 2631eead41 In gcc/testsuite/: 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/testsuite/:
2010-09-30  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2005-10-04  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4278236
        * obj-c++.dg/bad-forward-decl.mm: New

In gcc/objc/:
2010-09-30  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2005-10-04  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4278236
        * objc-act.c (objc_declare_class): Pick the right
        type tree.

From-SVN: r164745
2010-09-30 08:33:54 +00:00
Nicola Pero 13ed556f05 Fixed dates in ChangeLogs for my last commit - apologies
From-SVN: r164736
2010-09-29 22:24:00 +00:00
Nicola Pero a6341d571d In gcc/: 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-09-29  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.
        * c-parser.c: Applied change originally in c-parse.in.

        2005-10-04  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4281748
        * c-decl.c (start_decl): Check for redeclaration of class name.
        * c-parse.in (after_type_declarator): Recognize CLASSNAME.

In gcc/c-family/:
2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2005-10-04  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4281748
        * c-common.h (objc_check_global_decl): New declaration.
        * stub-objc.c (objc_check_global_decl): New stub.

In gcc/objc/:
2010-09-28  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2005-10-04  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4281748
        * objc-act.c (objc_check_global_decl): New

In gcc/testsuite/:
2010-09-28  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2005-10-04  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4281748
        * objc.dg/naming-2.m: Update
        * objc.dg/naming-3.m: New

From-SVN: r164735
2010-09-29 22:21:20 +00:00
Nicola Pero 1973201f32 In gcc/: 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-09-29  Nicola Pero  <nicola.pero@meta-innovation.com>

        * c-parser.c (c_lex_one_token): In Objective-C, when dealing with
        a CPP_NAME which is a reserved word, clearly separate cases for
        OBJC_IS_PQ_KEYWORD, OBJC_IS_AT_KEYWORD and OBJC_IS_CXX_KEYWORD.

In gcc/c-family:
2010-09-29  Nicola Pero  <nicola.pero@meta-innovation.com>

        * c-common.h (OBJC_IS_CXX_KEYWORD): New macro.  Updated comments.
        (objc_is_reserved_word): Removed.
        * c-common.c: Updated comments.
        * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
        objc_is_reserved_word.
        * stub-objc.c (objc_is_reserved_word): Removed.

In gcc/objc/:
2010-09-29  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (objc_is_reserved_word): Removed.

In gcc/testsuite/:
2010-09-29  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc.dg/keywords-1.m: New test.
        * objc.dg/keywords-2.m: New test.
        * objc.dg/keywords-3.m: New test.
        * obj-c++.dg/keywords-1.mm: New test.
        * obj-c++.dg/keywords-2.mm: New test.

From-SVN: r164715
2010-09-29 07:34:37 +00:00
Iain Sandoe f7e71da52f add parsing for ObjC* method & method parm attributes
gcc/cp:
	
	Partially merged from apple/trunk branch on FSF servers:
	2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
	Radar 3803157 (method attributes)

	* parser.c (cp_parser_objc_method_keyword_params): Handle attributes.
	(cp_parser_objc_method_tail_params_opt): Likewise.
	(cp_parser_objc_method_signature): Likewise.
	(cp_parser_objc_method_maybe_bad_prefix_attributes): New.
	(cp_parser_objc_method_prototype_list): Handle attributes.
	(cp_parser_objc_method_definition_list): Likewise.

gcc/objc:
	
	* objc-act.c (objc_add_method_declaration): Handle attributes.
	(objc_start_method_definition): Likewise.
	(objc_generate_cxx_ctor_or_dtor): Pass NULL attributes to ctor/dtor.
	(objc_build_keyword_decl): Handle attributes.

gcc:

	* c-parser.c (c_parser_declaration_or_fndef): Diagnose incorrect prefix
	attributes on methods.
	 (c_parser_objc_method_definition): Handle attributes.
	(c_parser_objc_methodproto): Likewise.
	(c_parser_objc_maybe_method_attributes): New.
	(c_parser_objc_method_decl): Handle attributes, add a similar diagnostic
	to ObjC++ for a missing definition.

gcc/c-family:
	
	* c-common.h: Update declarations to include attributes.
	* stub-objc.c: Likewise.

testsuite:

	* objc.dg/attributes/method-attribute-1.m: New.
	* objc.dg/attributes/method-attribute-2.m: New.

	* obj-c++.dg/attributes/method-attribute-1.m: New.
	* obj-c++.dg/attributes/method-attribute-2.m: New.

From-SVN: r164702
2010-09-28 21:02:38 +00:00
Richard Henderson f0a0390e69 Hookize TARGET_UNWIND_INFO et al.
From-SVN: r164701
2010-09-28 13:44:58 -07:00
Iain Sandoe c165dca7ef add ObjC* class, category and protocol attribute parsers
gcc/c-family:

	* c-common.h (objc_start_class_interface): Adjust prototype.
	(objc_start_category_interface): Likewise.
	(objc_start_protocol): Likewise.
	* stub-objc.c (objc_start_protocol): Adjust for extra argument.
	(objc_start_class_interface): Likewise.
	(objc_start_category_interface): Likewise.

gcc/objc:

	* objc-act.c (objc_start_class_interface): Handle and ignore attributes.
	(objc_start_category_interface): Likewise.
	(objc_start_protocol): Likewise.

gcc/cp:

	* parser.c (cp_parser_objc_valid_prefix_attributes): New.
	(cp_parser_declaration): Parse prefix attributes for ObjC++.
	(cp_parser_objc_protocol_declaration): Handle attributes.
	(cp_parser_objc_class_interface): Likewise.
	(cp_parser_objc_declaration): Likewise.

gcc:

	* c-parser.c (c_parser_objc_class_definition): Adjust prototype.
	(c_parser_objc_protocol_definition): Likewise.
	(c_parser_external_declaration): Provide dummy attribute arguments.
	(c_parser_declaration_or_fndef): Parse prefix attributes for ObjC.
	(c_parser_objc_class_definition): Handle attributes.
	(c_parser_objc_protocol_definition): Likewise.

gcc/testsuite:

	* objc.dg/attributes: New.
	* objc.dg/attributes/attributes.exp: New.
	* objc.dg/attributes/class-attribute-1.m: New.
	* objc.dg/attributes/class-attribute-2.m: New
	* objc.dg/attributes/categ-attribute-1.m: New
	* objc.dg/attributes/categ-attribute-2.m: New
	* objc.dg/attributes/proto-attribute-1.m: New

	* obj-c++.dg/attributes: New.
	* obj-c++.dg/attributes/attributes.exp: New
	* obj-c++.dg/attributes/class-attribute-1.mm: New
	* obj-c++.dg/attributes/class-attribute-2.mm: New
	* obj-c++.dg/attributes/categ-attribute-1.mm: New
	* obj-c++.dg/attributes/categ-attribute-2.mm: New
	* obj-c++.dg/attributes/proto-attribute-1.mm: New

From-SVN: r164700
2010-09-28 20:08:38 +00:00
Nicola Pero 2687787342 In gcc/objc/: 2010-09-28 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-09-28  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2005-08-23  Stuart Hastings <stuart@apple.com>
                    Ziemowit Laski  <zlaski@apple.com>

        Radar 4209854
        * objc-act.c (objc_decay_parm_type): New function.
        (get_arg_type_list): Decay types for all named arguments.
        (objc_push_parm): Rebuild the PARM_DECL if its type has
        been decayed.
In gcc/testsuite/:
2010-09-28  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers (test method-20.m
        from the branch renamed to method-20b.m to avoid clashes).

        2005-08-23  Stuart Hastings <stuart@apple.com>
                    Ziemowit Laski  <zlaski@apple.com>

        Radar 4209854
        * obj-c++.dg/method-23.mm: New.
        * objc.dg/method-20.m: New.

From-SVN: r164694
2010-09-28 17:58:55 +00:00
Nicola Pero a00ac5336e In gcc/objc/: 2010-09-28 Nicola Pero <nicola@nicola.brainstorm.co.uk>
In gcc/objc/:
2010-09-28  Nicola Pero  <nicola@nicola.brainstorm.co.uk>

        * objc-act.c (encode_type): Fixed encoding enums with the next
        runtime.

From-SVN: r164693
2010-09-28 17:39:43 +00:00
Nicola Pero 4c11650506 In gcc/objc/: 2010-09-28 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-09-28  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2005-07-18  Ziemowit Laski  <zlaski@apple.com>

        Radar 4175534
        * objc-act.c (objc_compare_types): A new silent comparison
        mode (-4), differing from regular comparison (-3) in that
        'false' is returned instead of issuing warnings.

In gcc/testsuite/:
2010-09-28  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2005-07-18  Ziemowit Laski  <zlaski@apple.com>

        Radar 4175534
        * obj-c++.dg/method-22.mm: New.

From-SVN: r164681
2010-09-28 10:20:11 +00:00
Nicola Pero 06e67e167d In gcc/objc/: 2010-09-28 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-09-28  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc-act.c (encode_type): Do not add 'r' with the next runtime.
        (encode_aggregate_within): Reorganized code to be more readable.
        (encode_aggregate_fields): Updated second argument to be 'bool'
        instead of 'int'.

From-SVN: r164680
2010-09-28 09:54:51 +00:00
Nicola Pero cd3c99ba58 Fixed typo in my last commit which would break bootstrap
From-SVN: r164667
2010-09-27 20:10:34 +00:00
Nicola Pero 177b48f930 In gcc/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        * doc/objc.texi (Type encoding): Added the new 'long double' (D)
        code.  Added byref, which was missing in the list of codes.
        Explain that enumeration values are encoded as the integer type
        that the compiler uses to store them.  Explain and make examples
        of how 'const' interacts with pointers, and the complication of
        the encoding of 'const char *'.
        (Legacy type encoding): New subsection, explaining that GCC emits
        incorrect type encodings for the NeXT runtime for compatibility
        reasons.
        (@@encode): New subsection, explaining @encode and particularly
        that protocol qualifiers are not recognized inside an @encode()
        expression.
        (Method signatures): New subsection, explaining how method
        signatures are encoded.

In gcc/objc/:
2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc/45763
        PR objc/25450
        PR objc/25464
        * objc-act.c: Improved comments for encoding functions.
        (encode_aggregate_within): For the GNU runtime, rewritten some
        obsfuscated code to clarify the various cases.
        (encode_aggregate): Function removed.
        (encode_array): Generate an error if asked to encode an incomplete
        array as part of generating instance variables.  Else, when
        encoding an incomplete array inside a structure, encode it as an
        array of zero size.
        (encode_pointer): For the GNU runtime, fixed encoding 'BOOL *' as
        '^c' instead of '*'.
        (encode_gnu_bitfield): Encode enumerated types exactly in the same
        type as integer types instead of using a hardcoded 'i'.  If asked
        to encode a non-integer type as a bitfield, do not abort
        compilation immediately; instead generate an error, then skip the
        type.
        (encode_type): Use a 'switch' instead of a sequence of 'if's.
        Added a 'default' clause that gets executed if the type can not be
        matched, and that encodes it as '?' (unknown) and produces a
        warning.  For the GNU runtime, encode enumerated types exactly in
        the same way as integer types instead of using a hardcoded 'i'.
        Encode long double as 'D'.  Encode 128-bit integers as 'T' or 't'.
        Encode C++ reference types as pointers.  Call encode_vector to
        encode vectors.
        (encode_vector): New function.

2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.  I modified the
        changes to be used only when compiling for the NeXT runtime.

        2005-10-10  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4301047

        * objc-act.c (encode_type): Remove the hack.

        2005-07-20  Ziemowit Laski  <zlaski@apple.com>

        Radar 4136935
        * objc-act.c (pointee_is_readonly): New function.
        (encode_pointer, encode_aggregate_within, encode_type):
        Attempt to emulate GCC 3.3 when generating type encodings.

In gcc/testsuite/:
2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc/25464
        * objc.dg/type-size-3.m: New test.

2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc/45763
        * objc.dg/encode-1.m: Execute the test with the GNU runtime as
        well.

2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc/25450
        * objc.dg/encode-3.m: Updated for fix of encoding of enums.
        * objc.dg/type-size-2.m: Same change.
        * obj-c++.dg/encode-5.mm: Same change.

2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.  The original
        Changelogs are below.

        * objc.dg/encode-6.m: Execute the test only with the GNU runtime.
        * objc.dg/encode-6-next.m: New file (from encode-6.m in the
        branch).
        * objc.dg/encode-7-next.m: New file (from encode-7.m in the
        branch).
        * objc.dg/encode-7-next-64bit.m: New file (from encode-7-64bit.m
        in the branch).
        * objc.dg/proto-qual-1.m: Test the 3.3 ABI on NeXT (from
        proto-qual-1.m in the branch) and the normal ABI on GNU.
        * objc.dg/threedotthree-abi-1.m: New file (from the branch).  Run
        the test only with the NeXT runtime.
        * obj-c++/encode-1.mm: Execute the test only with the GNU runtime.
        * obj-c++/encode-1-next.mm: New file (from encode-1.mm in the
        branch).
        * obj-c++.dg/threedotthree-abi-1.mm: New file (from the branch).
        Run the test only with the NeXT runtime.

        2006-03-30 Fariborz Jahanian <fjahanian@apple.com>

        Radar 4492973
        * objc.dg/encode-7-64bit.m: New.
        * objc.dg/encode-7.m: Skip if -m64.

        2005-10-19  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4301047
        * objc.dg/proto-qual-1.m: Fix test to match 3.3 ABI
        * obj-c++.dg/threedotthree-abi-1.mm: New
        * objc.dg/threedotthree-abi-1.m: New

        2005-07-20  Ziemowit Laski  <zlaski@apple.com>

        Radar 4136935
        * obj-c++.dg/encode-1.mm: Tweak encodings to match fix.
        * objc.dg/encode-6.m: Likewise.
        * objc.dg/encode-7.m: New test case.

In libobjc/:
2010-09-26  Nicola Pero  <nicola.pero@meta-innovation.com>

        * encoding.c (objc_sizeof_type): Added support for vector type and
        for double long types.
        (objc_alignof_type): Same change.
        (objc_skip_typespec): Same change.
        * objc/encoding.h (_C_GCINVISIBLE): Use '|' for _C_GCINVISIBLE
        instead of '!' since '!' is already used for _C_VECTOR.
        * objc/objc-api.h (_C_LNG_DBL): Added.

From-SVN: r164659
2010-09-27 19:22:13 +00:00
Nicola Pero b581b85b2e In gcc/: 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/:
2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.  Removed small
        change in build_conditional_expr that had been added when fixing
        PR objc/27377 and which did the same check in a less complete way.

        2005-12-15  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4229905
        * c-typeck.c (build_conditional_expr): Call objc_have_common_type when
        looking for objective-c common pointer types.

        2005-06-22  Ziemowit Laski  <zlaski@apple.com>

        Radar 4154928
        * c-typeck.c (build_conditional_expr): For two ObjC pointer types,
        use their ObjC common type.

In gcc/c-family:
2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2005-12-15  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4229905
        * c-common.h (objc_have_common_type): New declaration.
        * stub-objc.c (objc_have_common_type): New stub.

        2005-06-22  Ziemowit Laski  <zlaski@apple.com>

        Radar 4154928
        * c-common.h (objc_common_type): New prototype.
        * stub-objc.c (objc_common_type): New stub.

In gcc/objc/:
2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2005-12-15  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4229905
        * objc-act.c (objc_have_common_types): New function.

        2005-06-22  Ziemowit Laski  <zlaski@apple.com>

        Radar 4154928
        * objc-act.c (objc_common_type): New function.

In gcc/cp/:
2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from apple/trunk branch on FSF servers:

        2005-12-15  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4229905
        * typeck.c (composite_pointer_type): Call objc_have_common_type
        when comparing two objective-c pointer types.

        2005-06-22  Ziemowit Laski  <zlaski@apple.com>

        Radar 4154928
        * call.c (standard_conversion): Allow for a pointer conversion
        between any two ObjC pointer types.
        * typeck.c (composite_pointer_type): Determine common type
        for two ObjC pointer types.

In gcc/testsuite/:
2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.  Renamed
        const-str-12.m to constr-str-12b.m to avoid conflicts.

        2005-12-15  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4229905
        * obj-c++.dg/warn5.mm: New

        2005-06-22  Ziemowit Laski  <zlaski@apple.com>

        Radar 4154928
        * obj-c++.dg/const-str-12.mm: New.
        * objc.dg/const-str-12.m: New.

From-SVN: r164655
2010-09-27 18:04:09 +00:00
Richard Guenther fa2ea33de8 objc-act.c (objc_get_class_reference): Use CP_TYPE_CONTEXT.
2010-09-27  Richard Guenther  <rguenther@suse.de>

	* objc-act.c (objc_get_class_reference): Use CP_TYPE_CONTEXT.
	(objc_is_global_reference_p): Use DECL_FILE_SCOPE_P.

From-SVN: r164652
2010-09-27 15:46:07 +00:00
Nicola Pero 1caeb1af0c In gcc/objc/:
* objc-act.c: Removed historical, obsolete comment at the top of
        the file.

From-SVN: r164637
2010-09-26 19:04:42 +00:00
Nicola Pero 45547c7fca re PR objc/23710 (objc front-end should not "abort" after erroring out about method definition not in class context)
PR objc/23710
In gcc/:
        * c-family/c-common.h (objc_start_method_definition): Return bool
        instead of void.
        * c-family/stub-objc.c (objc_start_method_definition): Return bool
        instead of void.
        * c-parser.c (c_parser_objc_method_definition): Check the return
        value of objc_start_method_definition and if false is returned,
        parse the method definition but emit no code.
In gcc/objc/:
        * objc-act.c (objc_start_method_definition): Do not abort upon a
        'method definition not in @implementation context' error.  Return
        'false' instead.
In gcc/testsuite/:
       * objc.dg/invalid-method-1.m: New.

From-SVN: r164497
2010-09-21 20:47:04 +00:00
Nicola Pero c0c24aa470 re PR objc/25965 (Allows duplicate member names in objc subclasses)
PR objc/25965
In gcc/objc/:
       * objc-act.c (objc_get_interface_ivars): New function.
       (objc_collecting_ivars): New variable.
       (continue_class): Set and reset objc_collecting_ivars for context.
In gcc/:
       * c-decl.c (detect_field_duplicates): If compiling Objective-C,
       call objc_get_interface_ivars ().
       * c-family/c-common.h (objc_get_interface_ivars): New declaration.
       * c-family/stub-objc.c (objc_get_interface_ivars): New stub.
In gcc/objcp/:
       * objcp-decl.c (objcp_finish_struct): Call
       objc_get_interface_ivars() and check for duplicate ivars.

In gcc/testsuite/:
       Merge from 'apple/trunk' branch on FSF servers.

       2005-10-11  Fariborz Jahanian <fjahanian@apple.com>

               Radar 4291785

               objc.dg/naming-4.m: New
               objc.dg/naming-5.m: New
               obj-c++.dg/naming-1.mm: New
               obj-c++.dg/naming-2.mm: New

From-SVN: r164491
2010-09-21 18:51:34 +00:00
Nicola Pero 0f185d6eb2 In gcc/testsuite/:
2010-09-15  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2006-03-09 Fariborz Jahanian <fjahanian@apple.com>

        Radar 4457381
        * objc.dg/msg-in-protocol.m: New.
        * obj-c++.dg/msg-in-protocol.mm: New.

        2006-02-07  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4219590
        * objc.dg/break-in-ifstmt.m: New.
        
        2005-08-22  Ziemowit Laski  <zlaski@apple.com>

        Radar 4174166
        * obj-c++.dg/comp-types-13.mm: New.
        * objc.dg/comp-types-12.m: New.

        2005-08-22  Ziemowit Laski  <zlaski@apple.com>

        Radar 4216500
        * obj-c++.dg/proto-lossage-7.mm: New.
        * objc.dg/proto-lossage-7.m: New.

In gcc/objc/:
        
2010-09-15  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2006-03-09 Fariborz Jahanian <fjahanian@apple.com>

        Radar 4457381
        * objc/objc-act.c (objc_finish_message_expr): Look for message in
        @class's protocol list.

        2006-02-07  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4219590
        * objc/objc-act.c (objc_start_method_definition): Initialize
        break/continue labels.

        2005-08-22  Ziemowit Laski  <zlaski@apple.com>

        Radar 4174166
        * objc-act.c (objc_compare_types): Compare function
        pointers; indicate success if the right-hand side has
        a return type that is covariant, and the argument types
        contravariant, with those of the left side.

        2005-08-22  Ziemowit Laski  <zlaski@apple.com>

        Radar 4216500
        * objc-act.c (objc_get_protocol_qualified_type): When looking
        at a typedef, retrieve the precise type it describes (rather
        than merely looking up a class by name).

From-SVN: r164290
2010-09-15 00:08:59 +00:00
Nicola Pero 96cb32ac19 objc-act.c (objc_begin_try_stmt): Generate an error if -fobjc-exceptions was not used.
* objc/objc-act.c (objc_begin_try_stmt): Generate an error if
        -fobjc-exceptions was not used.  (objc_build_throw_stmt): Same
        change.

From-SVN: r164150
2010-09-10 09:54:04 +00:00
Nathan Froyd 910ad8dee5 tree.h (DECL_CHAIN): Define.
gcc/
	* tree.h (DECL_CHAIN): Define.
	* alias.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
	* c-decl.c: Likewise.
	* c-parser.c: Likewise.
	* c-typeck.c: Likewise.
	* cfgexpand.c: Likewise.
	* cgraph.c: Likewise.
	* cgraphunit.c: Likewise.
	* combine.c: Likewise.
	* config/alpha/alpha.c: Likewise.
	* config/arm/arm.c: Likewise.
	* config/frv/frv.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/i386/winnt-cxx.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/iq2000/iq2000.c: Likewise.
	* config/mep/mep.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/pa/som.h: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sh/symbian-cxx.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/vxworks.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.
	* coverage.c: Likewise.
	* dbxout.c: Likewise.
	* dwarf2out.c: Likewise.
	* emit-rtl.c: Likewise.
	* expr.c: Likewise.
	* function.c: Likewise.
	* gimple-low.c: Likewise.
	* gimple-pretty-print.c: Likewise.
	* gimplify.c: Likewise.
	* integrate.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa-struct-reorg.c: Likewise.
	* ipa-type-escape.c: Likewise.
	* langhooks.c: Likewise.
	* lto-cgraph.c: Likewise.
	* omp-low.c: Likewise.
	* stor-layout.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-complex.c: Likewise.
	* tree-dfa.c: Likewise.
	* tree-dump.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-mudflap.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-object-size.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-tailcall.c: Likewise.
	* tree-vrp.c: Likewise.
	* tree.c: Likewise.
	* var-tracking.c: Likewise.
	* varasm.c: Likewise.

gcc/ada/
	* gcc-interface/decl.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
	* gcc-interface/trans.c: Likewise.
	* gcc-interface/utils.c: Likewise.
	* gcc-interface/utils2.c: Likewise.

gcc/c-family/
	* c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
	* c-format.c: Likewise.

gcc/cp/
	* cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
	* call.c: Likewise.
	* class.c: Likewise.
	* cp-gimplify.c: Likewise.
	* decl.c: Likewise.
	* decl2.c: Likewise.
	* init.c: Likewise.
	* mangle.c: Likewise.
	* name-lookup.c: Likewise.
	* optimize.c: Likewise.
	* parser.c: Likewise.
	* pt.c: Likewise.
	* rtti.c: Likewise.
	* search.c: Likewise.
	* semantics.c: Likewise.
	* typeck.c: Likewise.
	* typeck2.c: Likewise.

gcc/fortran/
	* f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
	* trans-common.c: Likewise.
	* trans-decl.c: Likewise.
	* trans-types.c: Likewise.
	* trans.c: Likewise.

gcc/java/
	* java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
	* boehm.c: Likewise.
	* class.c: Likewise.
	* decl.c: Likewise.
	* expr.c: Likewise.
	* jcf-parse.c: Likewise.
	* typeck.c: Likewise.
	* verify-glue.c: Likewise.

gcc/objc/
	* objc-act.c: Carefully replace TREE_CHAIN with DECL_CHAIN.

gcc/testsuite/
	* g++.dg/plugin/attribute_plugin.c: Carefully replace TREE_CHAIN
	with DECL_CHAIN.

From-SVN: r162223
2010-07-15 14:31:28 +00:00
Iain Sandoe 058bfe5300 make ObjC do LTO.
gcc/
	PR objc/44140
	* config/darwin.c (output_objc_section_asm_op): Save and restore
	section when outputting ObjC section list.

testsuite/

	PR objc/44140
	* objc.dg/lto/trivial-1_0.m: New.
	* objc.dg/lto/lto.exp: New.
	* obj-c++.dg/lto/trivial-1_0.mm: New.
	* obj-c++.dg/lto/lto.exp: New.
	* objc.dg/symtab-1.m: Adjust sizes.
	* objc.dg/image-info.m: Do not run for gnu-runtime.

gcc/objc/

	PR objc/44140
	* objc-act.c: build_objc_string_decl() remove declaration.
	(finish_var_decl): Remove forcing of var output and marking
	as "Used". 
	(init_def_list): Use integer_zero_node. 
	(init_objc_symtab): Use integer_zero_node, make the short
	integer type specific on relevant nodes.
	(generate_objc_symtab_decl): Remove call to 
	forward_declare_categories().  Use null_pointer_node where
	appropriate.  
	(build_module_descriptor): Comment and mark this item as 
	DECL_PRESERVE_P. 
	(generate_static_references): Use gcc_unreachable instead of
	abort (). 
	(diagnose_missing_method): New.
	(build_next_selector_translation_table): New.
	(build_gnu_selector_translation_table): New.
	(add_objc_string): Merge code from build_objc_string_decl...
	... and delete build_objc_string_decl().
	(generate_dispatch_table): Make integer types explicit.
	(generate_category): Pass implent and arrange for the data
	to be extracted within the routine.  Do not start new vars, 
	but finish the ones collcted during parsing.
	(generate_shared_structures): Likewise.
	(finish_objc):  Reorder code so that we finish variables before
	referencing them.  Save the global data before calling meta-data
	creation routines, and pass the current reference to the two 
	main routines.  Only call generate_objc_image_info () for the 
	NeXT runtime.
	(generate_classref_translation_entry): Comment on and make this
	item DECL_PRESERVE_P.
	(handle_class_ref): Use varpool interfaces, comment on and make
	this item DECL_PRESERVE_P.
	(handle_impent): Likewise.
	(generate_objc_image_info): Only generate when the content is 
	non-zero.  Make integer types explict.

From-SVN: r162030
2010-07-10 00:22:35 +00:00
Nathan Froyd 3e78185c79 re PR objc/24867 (many N^2 loops in objc frontend)
PR objc/24867
	* objc-act.c (build_sized_array_type): New function.
	(add_objc_string): Use it.
	(generate_protocol_list): Likewise.
	(generate_objc_image_info): Likewise.
	(add_field_decl): New function.
	(objc_build_struct): Use a VEC rather than building a TREE_LIST.
	(generate_struct_by_value_array): Use add_field_decl.
	(build_objc_symtab_template): Likewise.
	(build_module_descriptor): Likewise.
	(build_objc_exception_stuff): Likewise.
	(build_protocol_template): Likewise.
	(build_method_prototype_list_template): Likewise.
	(build_method_prototype_template): Likewise.
	(build_category_template): Likewise.
	(build_selector_template): Likewise.
	(build_class_template): Likewise.
	(build_super_template): Likewise.
	(build_ivar_template): Likewise.
	(build_ivar_list_template): Likewise.
	(build_method_list_template): Likewise.
	(build_method_template): Likewise.

From-SVN: r161777
2010-07-03 19:00:52 +00:00
Steven Bosscher 3b06d37902 system.h: Poison GCC_EXCEPT_H for front-end files.
gcc/ChangeLog:
2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>

	* system.h: Poison GCC_EXCEPT_H for front-end files.

	* langhooks.h (struct lang_hooks): Add eh_protect_cleanup_actions
	langhook.
	* langhooks-def.h (LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS) New.
	Define to NULL by default.
	* except.h: Define GCC_EXCEPT_H.
	(doing_eh): Remove prototype.
	(init_eh, init_eh_for_function): Move prototypes to toplev.h.
	(lang_protect_cleanup_actions): Remove.
	* except.c (lang_protect_cleanup_actions): Remove.
	(doing_eh): Remove.
	(gen_eh_region): Don't check doing_eh here.
	* toplev.h (init_eh, init_eh_for_function_): Moved from except.h.
	* tree-eh.c (honor_protect_cleanup_actions): Use new langhook
	instead of lang_protect_cleanup_actions.
	* omp-low.c (maybe_catch_exception): Likewise.
	* Makefile.in: Update dependencies.

gcc/c-family/ChangeLog:
2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>

	* c-cppbuiltin.c: Do not include except.h.

gcc/objc/ChangeLog:
2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>

	* objc-act.c: Do not include except.h.

gcc/cp/ChangeLog:
2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>

	* init.c: Do not include except.h.
	* decl.c: Likewise.
	* expr.c: Likewise.
	* cp-lang.c: Likewise.
	* pt.c: Likewise.
	* semantics.c: Likewise.
	* decl2.c: Likewise.
	* except.c: Likewise.
	(init_exception_processing): Do not set the removed
	lang_protect_cleanup_actions here.
	(cp_protect_cleanup_actions): Make non-static and remove prototype.
	(doing_eh): New, moved from except.c but removed the do_warning flag.
	(expand_start_catch_block): Update doing_eh call.
	(expand_end_catch_block): Likewise.
	(build_throw): Likewise.
	* cp-tree.h: Prototype cp_protect_cleanup_actions.
	* cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
	cp_protect_cleanup_actions.
	* Make-lang.in: Update dependencies.

gcc/objcp/ChangeLog:
2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>

	* objcp-lang.c: Do not include except.h.
	* Make-lang.in: Update dependencies.

gcc/java/ChangeLog:
2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>

	* lang.c: Do not include except.h
	* except.c: Likewise.
	(doing_eh): New, moved from except.c (in gcc/) but removed the
	do_warning flag.
	(maybe_start_try): Update doing_eh call.
	* Make-lang.in: Update dependencies.

gcc/ada/ChangeLog:
2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>

	* gcc-interface/misc.c: Do not include except.h.
	* gcc-interface/Make-lang.in: Update dependencies.

gcc/fortran/ChangeLog:
2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>

	* Make-lang.in: Update dependencies.

From-SVN: r161484
2010-06-28 10:52:46 +00:00
Laurynas Biveinis a9429e29f5 utils.c (init_gnat_to_gnu): Use typed GC allocation.
gcc/ada:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* gcc-interface/utils.c (init_gnat_to_gnu): Use typed GC
	allocation.
	(init_dummy_type): Likewise.
	(gnat_pushlevel): Likewise.

	* gcc-interface/trans.c (Attribute_to_gnu): Likewise.
	(Subprogram_Body_to_gnu): Likewise.
	(Compilation_Unit_to_gnu): Likewise.
	(start_stmt_group): Likewise.
	(extract_encoding): Likewise.
	(decode_name): Likewise.

	* gcc-interface/misc.c (gnat_printable_name): Likewise.

	* gcc-interface/decl.c (annotate_value): Likewise.

	* gcc-interface/ada-tree.h (struct lang_type): Add variable_size
	GTY option.
	(struct lang_decl): Likewise.
	(SET_TYPE_LANG_SPECIFIC): Use typed GC allocation.
	(SET_DECL_LANG_SPECIFIC): Likewise.

gcc/c-family:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* c-pragma.c (push_alignment): Use typed GC allocation.
	(handle_pragma_push_options): Likewise.

	* c-common.c (parse_optimize_options): Likewise.

	* c-common.h (struct sorted_fields_type): Add variable_size GTY
	option.

gcc/cp:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* typeck2.c (abstract_virtuals_error): Likewise.

	* pt.c (maybe_process_partial_specialization): Likewise.
	(register_specialization): Likewise.
	(add_pending_template): Likewise.
	(lookup_template_class): Likewise.
	(push_tinst_level): Likewise.

	* parser.c (cp_lexer_new_main): Likewise.
	(cp_lexer_new_from_tokens): Likewise.
	(cp_token_cache_new): Likewise.
	(cp_parser_context_new): Likewise.
	(cp_parser_new): Likewise.
	(cp_parser_nested_name_specifier_opt): Likewise.
	(cp_parser_template_id): Likewise.

	* name-lookup.c (binding_entry_make): Likewise.
	(binding_table_construct): Likewise.
	(binding_table_new): Likewise.
	(cxx_binding_make): Likewise.
	(pushdecl_maybe_friend): Likewise.
	(begin_scope): Likewise.
	(push_to_top_level): Likewise.

	* lex.c (init_reswords): Likewise.
	(retrofit_lang_decl): Likewise.
	(cxx_dup_lang_specific_decl): Likewise.
	(copy_lang_type): Likewise.
	(cxx_make_type): Likewise.

	* decl.c (make_label_decl): Likewise.
	(check_goto): Likewise.
	(start_preparsed_function): Likewise.
	(save_function_data): Likewise.

	* cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.

	* cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.

	* class.c (finish_struct_1): Likewise.

	* cp-tree.h (struct lang_type): Add variable_size GTY option.
	(struct lang_decl): Likewise.

	* parser.c (cp_parser_new): Update comment to not reference
	ggc_alloc.

gcc/fortran:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* trans-types.c (gfc_get_nodesc_array_type): Use typed GC
	allocation.
	(gfc_get_array_type_bounds): Likewise.

	* trans-decl.c (gfc_allocate_lang_decl): Likewise.
	(gfc_find_module): Likewise.

	* f95-lang.c (pushlevel): Likewise.

	* trans.h (struct lang_type): Add variable_size GTY option.
	(struct lang_decl): Likewise.

gcc/java:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.

	* jcf-parse.c (java_parse_file): Likewise.
	(process_zip_dir): Likewise.

	* java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
	(MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.

	* expr.c (add_type_assertion): Likewise.

	* decl.c (make_binding_level): Likewise.
	(java_dup_lang_specific_decl): Likewise.

	* constants.c (set_constant_entry): Likewise.
	(cpool_for_class): Likewise.

	* class.c (add_method_1): Likewise.
	(java_treetreehash_new): Likewise.

	* java-tree.h (struct lang_type): Add variable_size GTY option.
	(struct lang_decl): Likewise.

	* jch.h (struct cpool_entry): Likewise.

	* java-tree.h (java_treetreehash_create): Remove parameter ggc.

	* except.c (prepare_eh_table_type): Update
	java_treetreehash_create call.

	* class.c (add_method_1): Update java_treetreehash_create call.
	(java_treetreehash_create): Remove parameter gc.  Use
	htab_create_ggc.

gcc/lto:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* lto.c (lto_read_in_decl_state): Use typed GC allocation.
	(lto_file_read): Likewise.
	(new_partition): Likewise.
	(read_cgraph_and_symbols): Likewise.

gcc/objc:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC
	allocation.

	* objc-act.c (objc_volatilize_decl): Likewise.
	(objc_build_string_object): Likewise.
	(hash_init): Likewise.
	(hash_enter): Likewise.
	(hash_add_attr): Likewise.
	(add_class): Likewise.
	(start_class): Likewise.

gcc/objcp:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* objcp-decl.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC
	allocation.

gcc:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* doc/tm.texi (Per-Function Data): Do not reference ggc_alloc.

	* doc/gty.texi (GTY Options): Document typed GC allocation and
	variable_size GTY option.

	* ggc-internal.h: New.

	* ggc.h: Update copyright year.
	(digit_string): Move to stringpool.c.
	(ggc_mark_stringpool, ggc_purge_stringpool, ggc_mark_roots)
	(gt_pch_save_stringpool, gt_pch_fixup_stringpool)
	(gt_pach_restore_stringpool, gt_pch_p_S, gt_pch_note_object)
	(init_ggc_pch, ggc_pch_count_object, ggc_pch_total_size)
	(ggc_pch_this_base, ggc_pch_alloc_object, ggc_pch_prepare_write)
	(ggc_pch_write_object, ggc_pch_finish, ggc_pch_read)
	(ggc_force_collect, ggc_get_size, ggc_statistics)
	(ggc_print_common_statistics): Move to ggc-internal.h.
	(digit_vector, new_ggc_zone, destroy_ggc_zone, ggc_alloc_stat)
	(ggc_alloc, ggc_alloc_cleared, ggc_realloc, ggc_calloc, GGC_NEW)
	(GGC_CNEW, GGC_NEWVEC, GGC_CNEWVEC, GGC_NEWVAR, ggc_alloc_rtvec)
	(ggc_alloc_tree, gt_pch_save, ggc_min_expand_heuristic)
	(ggc_min_heapsize_heuristic, ggc_alloc_zone)
	(ggc_alloc_zone_pass_stat): Remove.
	(ggc_internal_alloc_stat, ggc_internal_alloc)
	(ggc_internal_cleared_alloc_stat): New.
	(GGC_RESIZEVEC, GGC_RESIZEVAR): Redefine.
	(ggc_internal_vec_alloc_stat)
	(ggc_internal_cleared_vec_alloc_stat)
	(ggc_internal_vec_alloc_stat, ggc_internal_cleared_vec_alloc)
	(ggc_alloc_atomic_stat, ggc_alloc_atomic)
	(ggc_alloc_cleared_atomic, ggc_cleared_alloc_htab_ignore_args)
	(ggc_cleared_alloc_ptr_array_two_args): New.
	(htab_create_ggc, splay_tree_new_ggc): Redefine.
	(ggc_splay_alloc): Change the type of the first argument to
	enum gt_types_enum.
	(ggc_alloc_string): Make macro.
	(ggc_alloc_string_stat): New.
	(ggc_strdup): Redefine.
	(rtl_zone, tree_zone, tree_id_zone): Declare unconditionally.
	(ggc_alloc_rtvec_sized): New.
	(ggc_alloc_zone_stat): Rename to ggc_internal_alloc_zone_stat.
	(ggc_internal_alloc_zone_pass_stat, ggc_internal_alloc_zone_stat)
	(ggc_internal_cleared_alloc_zone_stat)
	(ggc_internal_zone_alloc_stat)
	(ggc_internal_zone_cleared_alloc_stat)
	(ggc_internal_zone_vec_alloc_stat)
	(ggc_alloc_zone_rtx_def_stat)
	(ggc_alloc_zone_tree_node_stat)
	(ggc_alloc_zone_cleared_tree_node_stat)
	(ggc_alloc_cleared_gimple_statement_d_stat): New.

	* ggc-common.c: Include ggc-internal.h.
	(ggc_internal_cleared_alloc_stat): Rename from
	ggc_alloc_cleared_stat.
	(ggc_realloc_stat): Use ggc_internal_alloc_stat.
	(ggc_calloc): Remove.
	(ggc_cleared_alloc_htab_ignore_args): New.
	(ggc_cleared_alloc_ptr_array_two_args): New.
	(ggc_splay_alloc): Add obj_type parameter.
	(init_ggc_heuristics): Formatting fixes.

	* ggc-none.c: Update copyright year.
	(ggc_alloc_stat): Rename to ggc_alloc_stat.
	(ggc_alloc_cleared_stat): Rename to
	ggc_internal_cleared_alloc_stat.
	(struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New.

	* ggc-page.c: Update copyright year.  Include ggc-internal.h.
	Remove references to ggc_alloc in comments.
	(ggc_alloc_typed_stat): Call ggc_internal_alloc_stat.
	(ggc_alloc_stat): Rename to ggc_internal_alloc_stat.
	(new_ggc_zone, destroy_ggc_zone): Remove.
	(struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New.

	* ggc-zone.c: Include ggc-internal.h.  Remove references to
	ggc_alloc in comments.
	(ggc_alloc_zone_stat): ggc_internal_alloc_zone_stat.
	(ggc_internal_alloc_zone_pass_stat): New.
	(ggc_internal_cleared_alloc_zone_stat): New.
	(ggc_alloc_typed_stat): Use ggc_internal_alloc_zone_pass_stat.
	(ggc_alloc_stat): Rename ggc_internal_alloc_stat.
	(new_ggc_zone, destroy_ggc_zone): Remove.

	* stringpool.c: Update copyright year.  Include ggc-internal.h
	(digit_vector): Make static.
	(digit_string): Moved from ggc.h.
	(stringpool_ggc_alloc): Use ggc_alloc_atomic.
	(ggc_alloc_string): Rename to ggc_alloc_string_stat.

	* Makefile.in (GGC_INTERNAL_H): New.
	(ggc_common.o, ggc-page.o, ggc-zone.o, stringpool.o): Add
	$(GGC_INTERNAL_H) to dependencies.

	* gentype.c: Update copyright year.
	(walk_type): Accept variable_size GTY option.
	(USED_BY_TYPED_GC_P): New macro.
	(write_enum_defn): Use USED_BY_TYPED_GC_P.  Do not output
	whitespace at the end of strings.
	(get_type_specifier, variable_size_p): New functions.
	(alloc_quantity, alloc_zone): New enums.
	(write_typed_alloc_def): New function.
	(write_typed_struct_alloc_def): Likewise.
	(write_typed_typed_typedef_alloc_def): Likewise.
	(write_typed_alloc_defns): Likewise.
	(output_typename, write_splay_tree_allocator_def): Likewise.
	(write_splay_tree_allocators): Likewise.
	(main): Call write_typed_alloc_defns and
	write_splay_tree_allocators.

	* lto-streamer.h (lto_file_decl_data_ptr): New.

	* passes.c (order): Define using cgraph_node_ptr.

	* strinpool.c (struct string_pool_data): Declare nested_ptr using
	ht_identifier_ptr.

	* gimple.h (union gimple_statement_d): Likewise.

	* rtl.h (struct rtx_def): Likewise.
	(struct rtvec_def): Likewise.

	* tree.h (union tree_node): Likewise.

	* tree-ssa-operands.h (struct ssa_operand_memory_d): Likewise.

	* cfgloop.c (record_loop_exits): Use htab_create_ggc.

	* tree-scalar-evolution.c (scev_initialize): Likewise.

	* alias.c (record_alias_subset): Update splay_tree_new_ggc call.

	* dwarf2asm.c (dw2_force_const_mem): Likewise.

	* omp-low.c (lower_omp_critical): Likewise.

	* bitmap.h (struct bitmap_head_def): Update comment to not
	reference ggc_alloc.

	* config/pa/pa.c (get_deferred_label): Use GGC_RESIZEVEC.

	* ira.c (fix_reg_equiv_init): Use GGC_RESIZEVEC.

	* ipa-prop.c (duplicate_ggc_array): Rename to
	duplicate_ipa_jump_func_array.  Use typed GC allocation.
	(ipa_edge_duplication_hook): Call duplicate_ipa_jump_func_array.

	* gimple.c (gimple_alloc_stat): Use
	ggc_alloc_cleared_gimple_statement_d_stat.

	* varasm.c (create_block_symbol): Use ggc_alloc_zone_rtx_def.

	* tree.c (make_node_stat): Use
	ggc_alloc_zone_cleared_tree_node_stat.
	(make_tree_vec_stat): Likewise.
	(build_vl_exp_stat): Likewise.
	(copy_node_stat): Use ggc_alloc_zone_tree_node_stat.
	(make_tree_binfo_stat): Likewise.
	(tree_cons_stat): Likewise.

	* rtl.c (rtx_alloc_stat): Use ggc_alloc_zone_rtx_def_stat.
	(shallow_copy_rtx_stat): Likewise.
	(make_node_stat): Likewise.

	* lto-symtab.c: Fix comment.

	* tree-cfg.c (create_bb): Update comment to not reference
	ggc_alloc_cleared.
	* tree-ssa-structalias.c (struct heapvar_for_stmt): Fix param_is
	value.

	* varpool.c (varpool_node): Use typed GC allocation.
	(varpool_extra_name_alias): Likewise.

	* varasm.c (emutls_decl): Likewise.
	(get_unnamed_section): Likewise.
	(get_noswitch_section): Likewise.
	(get_section): Likewise.
	(get_block_for_section): Likewise.
	(build_constant_desc): Likewise.
	(create_constant_pool): Likewise.
	(force_const_mem): Likewise.

	* tree.c (build_vl_exp_stat): Likewise.
	(build_real): Likewise.
	(build_string): Likewise.
	(decl_debug_expr_insert): Likewise.
	(decl_value_expr_insert): Likewise.
	(type_hash_add): Likewise.
	(build_omp_clause): Likewise.

	* tree-ssanames.c (duplicate_ssa_name_ptr_info): Likewise.

	* tree-ssa.c (init_tree_ssa): Likewise.

	* tree-ssa-structalias.c (heapvar_insert): Likewise.

	* tree-ssa-operands.c (ssa_operand_alloc): Likewise.

	* tree-ssa-loop-niter.c (record_estimate): Likewise.

	* tree-ssa-alias.c (get_ptr_info): Likewise.

	* tree-scalar-evolution.c (new_scev_info_str): Likewise.

	* tree-phinodes.c (allocate_phi_node): Likewise.

	* tree-iterator.c (tsi_link_before): Likewise.
	(tsi_link_after): Likewise.

	* tree-eh.c (add_stmt_to_eh_lp_fn): Likewise.

	* tree-dfa.c (create_var_ann): Likewise.

	* tree-cfg.c (create_bb): Likewise.

	* toplev.c (alloc_for_identifier_to_locale): Likewise.
	(general_init): Likewise.

	* stringpool.c (stringpool_ggc_alloc): Likewise.
	(gt_pch_save_stringpool): Likewise.

	* sese.c (if_region_set_false_region): Likewise.

	* passes.c (do_per_function_toporder): Likewise.

	* optabs.c (set_optab_libfunc): Likewise.
	(set_conv_libfunc): Likewise.

	* lto-symtab.c (lto_symtab_register_decl): Likewise.

	* lto-streamer-in.c (lto_input_eh_catch_list): Likewise.
	(input_eh_region): Likewise.
	(input_eh_lp): Likewise.
	(make_new_block): Likewise.
	(unpack_ts_real_cst_value_fields): Likewise.

	* lto-section-in.c (lto_new_in_decl_state): Likewise.

	* lto-cgraph.c (input_node_opt_summary): Likewise.

	* loop-init.c (loop_optimizer_init): Likewise.

	* lambda.h (lambda_vector_new): Likewise.

	* lambda-code.c (replace_uses_equiv_to_x_with_y): Likewise.

	* ira.c (update_equiv_regs): Likewise.

	* ipa.c (cgraph_node_set_new): Likewise.
	(cgraph_node_set_add): Likewise.
	(varpool_node_set_new): Likewise.
	(varpool_node_set_add): Likewise.

	* ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise.
	(duplicate_ipa_jump_func_array): Likewise.
	(ipa_read_node_info): Likewise.

	* ipa-cp.c (ipcp_create_replace_map): Likewise.

	* integrate.c (get_hard_reg_initial_val): Likewise.

	* gimple.c (gimple_alloc_stat): Likewise.
	(gimple_build_omp_for): Likewise.
	(gimple_seq_alloc): Likewise.
	(gimple_copy): Likewise.

	* gimple-iterator.c (gsi_insert_before_without_update): Likewise.
	(gsi_insert_after_without_update): Likewise.

	* function.c (add_frame_space): Likewise.
	(insert_temp_slot_address): Likewise.
	(assign_stack_temp_for_type): Likewise.
	(allocate_struct_function): Likewise.
	(types_used_by_var_decl_insert): Likewise.

	* except.c (init_eh_for_function): Likewise.
	(gen_eh_region): Likewise.
	(gen_eh_region_catch): Likewise.
	(gen_eh_landing_pad): Likewise.
	(add_call_site): Likewise.

	* emit-rtl.c (get_mem_attrs): Likewise.
	(get_reg_attrs): Likewise.
	(start_sequence): Likewise.
	(init_emit): Likewise.

	* dwarf2out.c (new_cfi): Likewise.
	(queue_reg_save): Likewise.
	(dwarf2out_frame_init): Likewise.
	(new_loc_descr): Likewise.
	(find_AT_string): Likewise.
	(new_die): Likewise.
	(add_var_loc_to_decl): Likewise.
	(clone_die): Likewise.
	(clone_as_declaration): Likewise.
	(break_out_comdat_types): Likewise.
	(new_loc_list): Likewise.
	(loc_descriptor): Likewise.
	(add_loc_descr_to_each): Likewise.
	(add_const_value_attribute): Likewise.
	(tree_add_const_value_attribute): Likewise.
	(add_comp_dir_attribute): Likewise.
	(add_name_and_src_coords_attributes): Likewise.
	(lookup_filename): Likewise.
	(store_vcall_insn): Likewise.
	(dwarf2out_init): Likewise.

	* dbxout.c (dbxout_init): Likewise.

	* config/xtensa/xtensa.c (xtensa_init_machine_status): Likewise.

	* config/sparc/sparc.c (sparc_init_machine_status): Likewise.

	* config/score/score7.c (score7_output_external): Likewise.

	* config/score/score3.c (score3_output_external): Likewise.

	* config/s390/s390.c (s390_init_machine_status): Likewise.

	* config/rs6000/rs6000.c (builtin_function_type): Likewise.
	(rs6000_init_machine_status): Likewise.
	(output_toc): Likewise.

	* config/pa/pa.c (pa_init_machine_status): Likewise.
	(get_deferred_plabel): Likewise.

	* config/moxie/moxie.c (moxie_init_machine_status): Likewise.

	* config/mmix/mmix.c (mmix_init_machine_status): Likewise.

	* config/mips/mips.c (mflip_mips16_use_mips16_p): Likewise.

	* config/mep/mep.c (mep_init_machine_status): Likewise.
	(mep_note_pragma_flag): Likewise.

	* config/m32c/m32c.c (m32c_init_machine_status): Likewise.

	* config/iq2000/iq2000.c (iq2000_init_machine_status): Likewise.

	* config/ia64/ia64.c (ia64_init_machine_status): Likewise.

	* config/i386/winnt.c (i386_pe_record_external_function): Likewise.
	(i386_pe_maybe_record_exported_symbol): Likewise.

	* config/i386/i386.c (get_dllimport_decl): Likewise.
	(ix86_init_machine_status): Likewise.
	(assign_386_stack_local): Likewise.

	* config/frv/frv.c (frv_init_machine_status): Likewise.

	* config/darwin.c (machopic_indirection_name): Likewise.

	* config/cris/cris.c (cris_init_machine_status): Likewise.

	* config/bfin/bfin.c (bfin_init_machine_status): Likewise.

	* config/avr/avr.c (avr_init_machine_status): Likewise.

	* config/arm/arm.c (arm_init_machine_status): Likewise.

	* config/alpha/alpha.c (alpha_init_machine_status): Likewise.
	(alpha_need_linkage): Likewise.
	(alpha_use_linkage): Likewise.

	* cgraph.c (cgraph_allocate_node): Likewise.
	(cgraph_create_edge_1): Likewise.
	(cgraph_create_indirect_edge): Likewise.
	(cgraph_add_asm_node): Likewise.

	* cfgrtl.c (init_rtl_bb_info): Likewise.

	* cfgloop.c (alloc_loop): Likewise.
	(rescan_loop_exit): Likewise.

	* cfg.c (init_flow): Likewise.
	(alloc_block): Likewise.
	(unchecked_make_edge): Likewise.

	* c-parser.c (c_parse_init): Likewise.
	(c_parse_file): Likewise.

	* c-decl.c (bind): Likewise.
	(record_inline_static): Likewise.
	(push_scope): Likewise.
	(make_label): Likewise.
	(lookup_label_for_goto): Likewise.
	(finish_struct): Likewise.
	(finish_enum): Likewise.
	(c_push_function_context): Likewise.

	* bitmap.c (bitmap_element_allocate): Likewise.
	(bitmap_gc_alloc_stat): Likewise.

	* alias.c (record_alias_subset): Likewise.
	(init_alias_analysis): Likewise.

include:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* splay-tree.h: Update copyright years.
	(splay_tree_s): Document fields.
	(splay_tree_new_typed_alloc): New.

	* hashtab.h: Update copyright years.
	(htab_create_typed_alloc): New.

libcpp:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* include/symtab.h (ht_identifier_ptr): New.

libiberty:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* splay-tree.c: Update copyright years.
	(splay_tree_new_typed_alloc): New.
	(splay_tree_new_with_allocator): Use it.

	* hashtab.c: Update copyright years.
	(htab_create_typed_alloc): New.
	(htab_create_alloc): Use it.

	* functions.texi: Regenerate.

From-SVN: r160425
2010-06-08 07:25:24 +00:00
Steven Bosscher 39dabefd0e c-common.c: Move to c-family/.
gcc/ChangeLog:
	* c-common.c: Move to c-family/.
	* c-common.def: Likewise.
	* c-common.h: Likewise.
	* c-cppbuiltin.c: Likewise.
	* c-dump.c: Likewise.
	* c-format.c: Likewise.
	* c-format.h : Likewise.
	* c-gimplify.c: Likewise.
	* c-lex.c: Likewise.
	* c-omp.c: Likewise.
	* c.opt: Likewise.
	* c-opts.c: Likewise.
	* c-pch.c: Likewise.
	* c-ppoutput.c: Likewise.
	* c-pragma.c: Likewise.
	* c-pragma.h: Likewise.
	* c-pretty-print.c: Likewise.
	* c-pretty-print.h: Likewise.
	* c-semantics.c: Likewise.
	* stub-objc.c: Likewise.

	* gengtype.c (get_file_langdir): Special-case files in c-family/.
	(get_output_file_with_visibility): Fix name for c-common.h.
	* c-config-lang.in: Update paths in gtfiles for files in c-family/.

	* c-tree.h: Update include path for moved files.
	* c-lang.c: Likewise.
	* c-lang.h: Likewise.
	* c-parser.c: Likewise.
	* c-convert.c: Likewise.
	* c-decl.c: Likewise.
	* c-objc-common.c: Likewise.
	* configure.ac: Make sure c-family/ exists in the build directory.
	* configure: Regenerate.
	* Makefile.in: Update paths for moved files.  Regroup files per
	location and update dependencies.  Move generated_files down after
	ALL_GTFILES_H.

	* config/spu/spu-c.c: Update paths for moved files.
	* config/mep/mep-pragma.c: Likewise.
	* config/darwin-c.c: Likewise.
	* config/i386/msformat-c.c: Likewise.
	* config/i386/i386-c.c: Likewise.
	* config/avr/avr-c.c: Likewise.
	* config/sol2-c.c: Likewise.
	* config/ia64/ia64-c.c: Likewise.
	* config/rs6000/rs6000-c.c: Likewise.
	* config/arm/arm.c: Likewise.
	* config/arm/arm-c.c: Likewise.
	* config/h8300/h8300.c: Likewise.
	* config/v850/v850-c.c: Likewise.

	* config/t-darwin: Fix dependencies for moved files.
	* config/t-sol2: Fix dependencies for moved files.
	* config/mep/t-mep: Fix dependencies for moved files.
	* config/ia64/t-ia64: Fix dependencies for moved files.
	* config/rs6000/t-rs6000: Fix dependencies for moved files.
	* config/v850/t-v850: Fix dependencies for moved files.
	* config/v850/t-v850e: Fix dependencies for moved files.

	* config/m32c/m32c-pragma.c

	* po/exgettext: Look in c-family/ also.

c-family/ChangeLog:
	* c-common.c: Include gt-c-family-c-common.h.
	* c-pragma.c: Include gt-c-family-c-pragma.h.

objc/ChangeLog:
	* objc-act.c: Update include path for moved files.
	* objc-lang.c: Likewise.
	* config-lang.in: Update paths in gtfiles for files in c-family/.

objcp/ChangeLog:
	* objcp-lang.c: Update include path for moved files.
	* config-lang.in: Update paths in gtfiles for files in c-family/.

cp/ChangeLog:
	* typeck.c: Update include path for moved files.
	* decl.c: Likewise.
	* rtti.c: Likewise.
	* cp-gimplify.c: Likewise.
	* cp-lang.c: Likewise.
	* pt.c: Likewise.
	* semantics.c: Likewise.
	* cxx-pretty-print.h: Likewise.
	* decl2.c: Likewise.
	* parser.c: Likewise.
	* cp-objcp-common.c: Likewise.
	* cp-tree.h: Likewise.
	* name-lookup.c: Likewise.
	* lex.c: Likewise.
	* name-lookup.h: Likewise.
	* config-lang.in: Update paths in gtfiles for files in c-family/.
	* Make-lang.in: Likewise.

From-SVN: r160330
2010-06-05 20:33:22 +00:00
Nathan Froyd bb9a7f511a objc-act.c (build_next_objc_exception_stuff): Give setjmp a varargs type instead of a zero-argument type.
* objc-act.c (build_next_objc_exception_stuff): Give setjmp a
	varargs type instead of a zero-argument type.

From-SVN: r160112
2010-06-01 15:54:39 +00:00
Nathan Froyd 178b70cce7 objc-act.c (synth_module_prologue): Use build_function_type_list instead of build_function_type.
* objc-act.c (synth_module_prologue): Use build_function_type_list
	instead of build_function_type.
	(build_module_initializer_routine): Likewise.
	(build_next_objc_exception_stuff): Likewise.
	(build_objc_exception_stuff): Likewise.

From-SVN: r160066
2010-05-31 02:20:16 +00:00
Joseph Myers 1da2ed5f19 diagnostic-core.h: New.
* diagnostic-core.h: New.  Contents moved from diagnostic.h and
	toplev.h.
	* diagnostic.c: Don't include toplev.h.
	(progname): Define.  Moved from toplev.c.
	(seen_error): New function.
	* diagnostic.h: Include diagnostic-core.h.
	(diagnostic_t, emit_diagnostic): Don't declare here.
	* toplev.c (progname): Move to toplev.c.
	(emit_debug_global_declarations, compile_file, finalize,
	do_compile, toplev_main): Use seen_error.
	* toplev.h: Include diagnostic-core.h.
	(trim_filename, GCC_DIAG_STYLE, ATTRIBUTE_GCC_DIAG,
	internal_error, warning, warning_at, error, error_n, error_at,
	fatal_error, pedwarn, permerror, sorry, inform, inform_n,
	verbatim, fnotice, progname): Move to diagnostic-core.h.
	* builtins.c: Include diagnostic-core.h instead of diagnostic.h.
	(expand_builtin_expect): Use seen_error.
	* c-decl.c: Include diagnostic-core.h instead of diagnostic.h.
	(c_make_fname_decl, c_write_global_declarations): Use seen_error.
	* c-format.c: Include diagnostic-core.h instead of diagnostic.h.
	* c-gimplify.c: Include diagnostic-core.h instead of diagnostic.h.
	* c-lang.c: Include diagnostic-core.h instead of diagnostic.h.
	* c-lex.c (c_lex_with_flags, interpret_float): Don't increment
	errorcount for errors.
	* c-opts.c (c_common_finish): Use seen_error.
	* cgraph.c: Include diagnostic-core.h instead of diagnostic.h.
	* cgraphunit.c (verify_cgraph_node, verify_cgraph,
	cgraph_output_pending_asms, cgraph_optimize): Use seen_error.
	* coverage.c: Include diagnostic-core.h instead of diagnostic.h.
	(get_coverage_counts): Use seen_error.
	* dwarf2out.c (dwarf2out_finish): Use seen_error.
	* gimplify.c (gimplify_var_or_parm_decl, gimple_push_cleanup,
	gimplify_body): Use seen_error.
	* ipa-inline.c (cgraph_early_inlining): Use seen_error.
	* ipa-pure-const.c (gate_pure_const): Use seen_error.
	* ipa-reference.c (gate_reference): Use seen_error.
	* jump.c: Include diagnostic-core.h instead of diagnostic.h.
	* lambda-code.c: Include diagnostic-core.h instead of
	diagnostic.h.
	* lto-cgraph.c: Include diagnostic-core.h instead of diagnostic.h.
	* lto-compress.c: Include diagnostic-core.h instead of
	diagnostic.h.
	* lto-section-in.c: Include diagnostic-core.h instead of
	diagnostic.h.
	* lto-streamer-out.c: Include diagnostic-core.h instead of
	diagnostic.h.
	* lto-streamer.c: Include diagnostic-core.h instead of
	diagnostic.h.
	(gate_lto_out): Use seen_error.
	* matrix-reorg.c: Include diagnostic-core.h instead of
	diagnostic.h.
	* omega.c: Include diagnostic-core.h instead of diagnostic.h.
	* omp-low.c: Include diagnostic-core.h instead of diagnostic.h.
	(gate_expand_omp, lower_omp_1): Use seen_error.
	* passes.c: Include diagnostic-core.h instead of diagnostic.h.
	(rest_of_decl_compilation, rest_of_type_compilation,
	gate_rest_of_compilation, ipa_write_summaries): Use seen_error.
	* tree-cfg.c (label_to_block_fn): Use seen_error.
	* tree-inline.c (optimize_inline_calls): Use seen_error.
	* tree-mudflap.c (mudflap_finish_file): Use
	seen_error.
	* tree-optimize.c (gate_all_optimizations,
	gate_all_early_local_passes, gate_all_early_optimizations): Use
	seen_error.
	* tree-ssa-structalias.c (gate_ipa_pta): Use seen_error.
	* varpool.c: Include diagnostic-core.h instead of diagnostic.h.
	(varpool_remove_unreferenced_decls,
	varpool_assemble_pending_decls): Use seen_error.
	* Makefile.in (DIAGNOSTIC_CORE_H): Define.
	(TOPLEV_H, DIAGNOSTIC_H): Update.
	(c-decl.o, c-lang.o, c-format.o, lto-compress.o, lto-cgraph.o,
	lto-streamer-out.o, lto-section-in.o, lto-streamer.o,
	c-gimplify.o, omp-low.o, omega.o, diagnostic.o, passes.o,
	builtins.o, jump.o, cgraph.o, varpool.o, matrix-reorg.o,
	coverage.o, lambda-code.o): Update dependencies.

cp:
	* call.c: Include diagnostic-core.h instead of diagnostic.h.
	* cp-lang.c: Don't include diagnostic.h
	* name-lookup.c: Include diagnostic-core.h instead of
	diagnostic.h.
	(cp_emit_debug_info_for_using): Use seen_error.
	* optimize.c: Include diagnostic-core.h instead of diagnostic.h.
	* parser.c: Include diagnostic-core.h instead of diagnostic.h.
	* pt.c (iterative_hash_template_arg): Use seen_error.
	* repo.c: Include diagnostic-core.h instead of diagnostic.h.
	* typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
	* Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
	cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
	dependencies.

lto:
	* lto.c: Include diagnostic-core.h instead of diagnostic.h.
	(read_cgraph_and_symbols, lto_main): Use seen_error.
	* Make-lang.in (lto/lto.o): Update dependencies.

objc:
	* objc-act.c: Include diagnostic-core.h instead of diagnostic.h.
	* Make-lang.in (objc/objc-act.o): Update dependencies.

From-SVN: r159947
2010-05-27 21:16:07 +01:00
Steven Bosscher 245763e30a Makefile.in (EXCEPT_H): Fix typo.
gcc/ChangeLog:
	* Makefile.in (EXCEPT_H): Fix typo.

objc/ChangeLog:
	* objc-act.h: Do not include gimple.h.
	* objc-act.c: Do not include rtl.h, expr.h, libfuncs.h, and tm_p.h.
	Include gimple.h.  Explain why except.h has to be included.
	* objc-lang.c: Do not include diagnostics.h.
	* Make-lang.in: Update dependencies.

objcp/ChangeLog:
	* objcp-decl.c: Do not include tm.h, rtl.h, expr.h, c-common.h,
	flags.h, input.h, except.h, output.h, toplev.h, cpplib.h, debug.h,
	and target.h.
	* objcp-lang.c: Do not include tm.h, toplev.h, diagnostics.h,
	and debug.h.  Explain why except.h has to be included.
	* Make-lang.in: Update dependencies.

cp/ChangeLog:
	* cp-tree.h: Do not include splay-tree.h.
	(struct prtmem_cst): Remove unused field and false comment.
	* typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
	* optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
	* init.c: Do not include rtl.h and expr.h.
	* class.c: Do not include rtl.h.  Include splay-tree.h.
	(build_clone): Use plain NULL instead of NULL_RTX.
	* decl.c: Do not include expr.h.  Explain why rtl.h has to be
	included.  Include splay-tree.h.
	* method.c: Do not include rtl.h and expr.h.
	(use_thunk): Use plain NULL instead of NULL_RTX.
	* except.c: Do not include rtl.h, expr.h, and libfuncs.h.
	* tree.c: Do not include rtl.h, insn-config.h, integrate.h,
	and target.h.  Include splay-tree.h.
	* expr.c: Do not include rtl.h and expr.h.
	* pt.c: Do not include obstack.h and rtl.h.
	(tsubst_friend_function): Use plain NULL instead of NULL_RTX.
	(tsubst_decl): Likewise.
	(instantiate_decl): Likewise.
	* semantics.c: Do not include exprt.h and debug.h.  Explain why
	rtl.h has to be included.
	* decl2.c: Do not include rtl.h and expr.h.  Include splay-tree.h.
	* call.c: Do not include rtl.h and expr.h.
	* search.c: Do not include obstack.h and rtl.h.
	* friend.c: Do not include rtl.h and expr.h.
	* Make-lang.in: Update dependencies.

From-SVN: r159839
2010-05-25 18:14:23 +00:00
Nathan Froyd 263d02e208 objc-act.c (objc_build_constructor): Adjust OBJCPLUS impedance mismatch code for VECs.
* objc-act.c (objc_build_constructor): Adjust OBJCPLUS impedance
	mismatch code for VECs.

From-SVN: r159834
2010-05-25 16:59:56 +00:00
Nathan Froyd 076a7055bb objc-act.c (objc_build_constructor): Take a VEC instead of a tree.
* objc-act.c (objc_build_constructor): Take a VEC instead of a tree.
	Use build_constructor instead of build_constructor_from_list.
	(objc_build_string_object): Build a VEC argument for
	objc_build_constructor.
	(init_def_list): Likewise.
	(init_objc_symtab): Likewise.
	(init_module_descriptor): Likewise.
	(generate_static_references): Likewise.
	(build_selector_translation_table): Likewise.
	(build_descriptor_table_initializer): Likewise.
	(generate_descriptor_table): Likewise.
	(build_protocol_initializer): Likewise.
	(build_ivar_list_initializer): Likewise.
	(generate_ivars_list): Likewise.
	(build_dispatch_table_initializer): Likewise.
	(generate_dispatch_table): Likewise.
	(generate_protocol_list): Likewise.
	(build_category_initializer): Likewise.
	(build_shared_structure_initializer): Likewise.
	(generate_objc_image_info): Likewise.

From-SVN: r159821
2010-05-25 13:56:13 +00:00
Iain Sandoe 619dea2d5c [multiple changes]
2010-04-30  Iain Sandoe  <iains@gcc.gnu.org>

	PR objc++/32052
	* objc-act.c (encode_aggregate_within): Encode structure tags
	with template args for ObjC++.

2010-04-30  Iain Sandoe <iains@gcc.gnu.org>

	PR objc++/32052
	* obj-c++.dg/encode-2.mm: Remove XFAIL. Add test for anonymous
	structure and nested declarations.
	* obj-c++.dg/encode-3.mm:  Remove XFAIL. Add test for anonymous
	structure and nested declarations.  Reduce header clutter and
	use _exit() rather than abort().
	* objc.dg/encode-10.m: New.
	* objc.dg/encode-11.m: New.

From-SVN: r158958
2010-05-01 00:32:13 +00:00
Steven Bosscher 9aae8d16dd toplev.c: Include varray.h for statistics dumping.
gcc/ChangeLog:
	* toplev.c: Include varray.h for statistics dumping.
	* tree.h: Do not declare varray_head_tag.
	* tree-into-ssa.c, tree-ssa-uninit.c, tree-phinodes.c, omega.c,
	regs.h, lto-cgraph.c, tree-ssa-loop-ivopts.c, tree-nomudflap.c,
	c-objc-common.c, lto-streamer-out.c, tree-ssa-propagate.c,
	gimple-low.c, c-semantics.c, dwarf2out.c, lto-streamer-in.c,
	lto-section-in.c, alias.c, tree-if-conv.c, gimplify.c, ggc-zone.c,
	tree-ssa.c, tree-ssa-loop-prefetch.c, integrate.h, c-gimplify.c,
	c-common.c, c-common.h, reg-stack.c, basic-block.h,
	tree-ssa-structalias.c, lto-section-out.c, tree-ssanames.c: Do not
	include varray.h.
	* Makefile.in: Update for abovementioned changes.

objc/ChangeLog:
	* objc-act.c: Do not include varray.h.

objcp/ChangeLog:
	* objcp-decl.c: Do not include varray.h.

cp/ChangeLog:
	* optimize.c, parser.c,mangle.c, cp-tree.h: DO not include varray.h.
	* Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.

From-SVN: r158933
2010-04-30 11:58:49 +00:00
Jakub Jelinek ebfbbdc556 re PR c/18624 (GCC does not detect local variable set but never used)
PR c/18624
	* tree.h (DECL_READ_P): Define.
	(struct tree_decl_common): Add decl_read_flag.
	* c-decl.c (pop_scope): If TREE_USED but !DECL_READ_P, issue
	a set but not used warning.
	(merge_decls): Merge DECL_READ_P flag.
	(finish_decl, build_compound_literal): Set DECL_READ_P flag.
	(finish_function): Issue -Wunused-but-set-parameter diagnostics.
	* c-common.c (handle_used_attribute, handle_unused_attribute):
	Likewise.
	* c-tree.h (default_function_array_read_conversion, mark_exp_read):
	New prototypes.
	* c-typeck.c (default_function_array_read_conversion, mark_exp_read):
	New functions.
	(default_conversion, c_process_expr_stmt): Call mark_exp_read.
	* c-parser.c (c_parser_initializer, c_parser_expr_no_commas,
	c_parser_binary_expression, c_parser_cast_expression,
	c_parser_expr_list, c_parser_omp_atomic, c_parser_omp_for_loop):
	Call default_function_array_read_conversion instead of
	default_function_array_conversion where needed.
	(c_parser_unary_expression, c_parser_conditional_expression,
	c_parser_postfix_expression_after_primary, c_parser_initelt):
	Likewise.  Call mark_exp_read where needed.
	(c_parser_statement_after_labels, c_parser_asm_operands,
	c_parser_typeof_specifier, c_parser_sizeof_expression,
	c_parser_alignof_expression, c_parser_initval): Call mark_exp_read
	where needed.
	* common.opt (Wunused-but-set-variable, Wunused-but-set-parameter):
	New.
	* toplev.c (warn_unused_but_set_variable): Default to warn_unused.
	(warn_unused_but_set_parameter): Default to warn_unused
	&& extra_warnings.
	* doc/invoke.texi: Document -Wunused-but-set-variable and
	-Wunused-but-set-parameter.

	* objc-act.c (finish_var_decl, objc_begin_catch_clause,
	really_start_method, get_super_receiver, handle_class_ref): Set
	DECL_READ_P in addition to TREE_USED.

	* gcc.dg/Wunused-var-1.c: New test.
	* gcc.dg/Wunused-var-2.c: New test.
	* gcc.dg/Wunused-var-3.c: New test.
	* gcc.dg/Wunused-var-4.c: New test.
	* gcc.dg/Wunused-var-5.c: New test.
	* gcc.dg/Wunused-var-6.c: New test.
	* gcc.dg/Wunused-parm-1.c: New test.

From-SVN: r158086
2010-04-07 22:33:36 +02:00
Iain Sandoe b51e84c954 re PR objc/35996 (ICE while building simple ObjC code with -fobjc-gc)
gcc/objc/Changelog:
2010-04-07  Iain Sandoe <iains@gcc.gnu.org>

	PR objc/35996
	* objc-act.c (objc_init): Warn that -fobjc-gc is ignored for
	-fgnu-runtime and set flag_objc_gc to zero.

testsuite:
2010-04-07  Iain Sandoe <iains@gcc.gnu.org>

	PR objc/35996
	* objc.dg/objc-gc-4.m: Run for all targets, prune new warning.
	* obj-c++.dg/objc-gc-3.mm: Ditto.

From-SVN: r158083
2010-04-07 19:57:46 +00:00
Iain Sandoe 58e0f0d345 re PR objc++/23716 (obj-c++.dg/comp-types-10.mm ICE with the GNU runtime)
fix PR23716

2010-04-07  Iain Sandoe <iains@gcc.gnu.org>

	PR objc++/23716
	* objc-act.c (build_module_initializer_routine): Make the argument
	to objc_start_function NULL_TREE when compiling ObjC++.

2010-04-07  Iain Sandoe <iains@gcc.gnu.org>

	PR objc++/23716
	* obj-c++.dg/comp-types-10.mm: Remove XFAIL.

From-SVN: r158076
2010-04-07 16:20:08 +00:00
Steven Bosscher c75c517d53 Make-lang.in, [...]: Update copyright years.
* ada/gcc-interface/Make-lang.in, alias.c, attribs.c, auto-inc-dec.c, 
	basic-block.h, bb-reorder.c, calls.c, c-common.c, cgraph.h,
	collect2.h, config/alpha/alpha.c, config/alpha/alpha.md,
	config/alpha/predicates.md, config/arm/arm.md,
	config/arm/lib1funcs.asm, config/arm/neon-schedgen.ml,
	config/avr/avr.c, config/avr/avr.md, config/bfin/bfin.c,
	config/darwin9.h, config/darwin.c, config/darwin.h,
	config/h8300/h8300.c, config/i386/cpuid.h, config/i386/cygming.h,
	config/i386/cygwin.h, config/i386/mingw32.h, config/i386/msformat-c.c,
	config/i386/sol2-10.h, config/i386/xopintrin.h, config/ia64/ia64.c,
	config/ia64/ia64.md, config/ia64/sync.md, config/mep/mep.c,
	config/mips/mips.md, config/mn10300/mn10300.c,
	config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.md,
	config/rs6000/aix.h, config/rs6000/dfp.md,
	config/rs6000/rs6000-builtin.def, config/rs6000/rs6000-c.c,
	config/rs6000/vector.md, config/rtems.h, config/rx/rx.md,
	config/s390/s390.md, config/sol2-c.c, config/sparc/sol2-bi.h,
	config/sparc/sol2-gas.h, config/sparc/sparc.h, config/sparc/sparc.md,
	config/sparc/sparc-protos.h, config/spu/spu.c, config/spu/spu-c.c,
	config/t-darwin, convert.c, c.opt, c-opts.c, cp/Make-lang.in,
	c-pretty-print.c, c-typeck.c, df-core.c, df-scan.c, diagnostic.c,
	diagnostic.h, doc/cppopts.texi, doc/cpp.texi, doc/extend.texi,
	doc/gimple.texi, doc/languages.texi, doc/plugins.texi, doc/rtl.texi,
	doc/standards.texi, doc/tree-ssa.texi, doc/trouble.texi, dominance.c,
	fold-const.c, fortran/Make-lang.in, fwprop.c, gcc-plugin.h,
	gensupport.c, gimple.h, gimple-iterator.c, graphite.c,
	graphite-clast-to-gimple.c, graphite-clast-to-gimple.h,
	graphite-dependences.c, graphite-poly.c, graphite-poly.h,
	graphite-ppl.c, graphite-ppl.h, graphite-scop-detection.c,
	graphite-sese-to-poly.c, graphite-sese-to-poly.h, ifcvt.c, intl.c,
	intl.h, ipa.c, ipa-cp.c, ipa-inline.c, ipa-prop.c, ipa-prop.h,
	ipa-pure-const.c, ipa-reference.c, ipa-type-escape.c, ira-color.c,
	ira-conflicts.c, ira-lives.c, java/Make-lang.in, lambda-code.c,
	loop-invariant.c, lto/Make-lang.in, lto-streamer.h, lto-streamer-in.c,
	objc/Make-lang.in, objcp/Make-lang.in, omp-low.c, optc-gen.awk,
	opt-functions.awk, opth-gen.awk, params.def, passes.c,
	postreload-gcse.c, print-tree.c, recog.c, regrename.c, reload.h,
	rtl.def, sched-int.h, sched-rgn.c, sel-sched-dump.c, sese.c, sese.h,
	store-motion.c, stor-layout.c, tree-cfgcleanup.c, tree-chrec.c,
	tree-complex.c, tree-data-ref.c, tree.def, tree-eh.c, tree-flow.h,
	tree-flow-inline.h, tree.h, tree-loop-distribution.c, tree-outof-ssa.c,
	tree-parloops.c, tree-pass.h, tree-predcom.c, tree-profile.c,
	tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-alias.c,
	tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-dce.c, tree-ssa-dom.c,
	tree-ssa-dse.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c,
	tree-ssa-loop-manip.c, tree-ssa-math-opts.c, tree-ssa-operands.c,
	tree-ssa-pre.c, tree-ssa-sccvn.c, tree-ssa-structalias.c,
	tree-ssa-uncprop.c, tree-tailcall.c, tree-vect-data-refs.c,
	tree-vect-loop.c, tree-vectorizer.h, tree-vect-slp.c, tree-vrp.c,
	unwind-dw2-fde-darwin.c, varpool.c: Update copyright years.

From-SVN: r157950
2010-04-02 19:54:46 +00:00
Mike Stump b42186f164 re PR objc/43061 (47 new GCC HEAD@156527 regressions)
PR objc/43061
        * cgraphunit.c (process_function_and_variable_attributes): Check
	DECL_PRESERVE_P instead of looking up attribute "used".
        * ipa-pure-const.c (check_decl): Likewise.
        * ipa-reference.c (has_proper_scope_for_analysis): Likewise.
        * ipa-type-escape.c (has_proper_scope_for_analysis): Likewise.
        * config/sol2.c (solaris_insert_attributes): Set DECL_PRESERVE_P
        instead of attribute "used".
        * config/sol2-c.c (solaris_pragma_init): Likewise.
        (solaris_pragma_fini): Likewise.

From-SVN: r156907
2010-02-19 19:06:38 +00:00
Mike Stump f8ba5508ff Add PR reference.
From-SVN: r156878
2010-02-18 22:21:23 +00:00
Iain Sandoe fca4c1d59a objc-act.c (finish_var_decl): Set the generated symbols as "used".
* objc-act.c (finish_var_decl):	Set the	generated symbols as "used".

Co-Authored-By: Mike Stump <mikestump@comcast.net>

From-SVN: r156877
2010-02-18 22:00:21 +00:00
Andrew Jenner 55bcd32b46 configure.ac: Add install-html to target_list for Make-hooks.
* configure.ac: Add install-html to target_list for Make-hooks.
	* configure: Regenerate.
	* fortran/Make-lang.in (F95_HTMLFILES): New.
	(fortran.html): Use it.
	(fortran.install-html): New.
	* Makefile.in (install-html): Add lang.install-html.
	* java/Make-lang.in (JAVA_HTMLFILES): New.
	(java.html): Use it.
	(java.install-html): New.
	* objc/Make-lang.in (objc.install-html): New.
	* objcp/Make-lang.in (obj-c++.install-html): New.
	* cp/Make-lang.in (c++.install-html): New.
	* ada/gcc-interface/Make-lang.in (ada.install-html): New.
	* lto/Make-lang.in (lto.install-html): New.

From-SVN: r155602
2010-01-04 01:36:36 +00:00
Shujing Zhao bcff5c1ed1 objc-act.c (objc_substitute_decl, [...]): Update build_indirect_ref calls.
2009-12-17  Shujing Zhao  <pearly.zhao@oracle.com>

	* objc-act.c (objc_substitute_decl, build_ivar_reference,
	get_super_receiver): Update build_indirect_ref calls.

From-SVN: r155311
2009-12-17 11:57:10 +00:00
Jakub Jelinek 0f900dfafa matrix-reorg.c (analyze_matrix_allocation_site): Remove unused malloc_fname variable.
* matrix-reorg.c (analyze_matrix_allocation_site): Remove unused
	malloc_fname variable.
	(check_allocation_function): Remove unused gsi and bb_level_0
	variables.
	(transform_access_sites): Remove unused d_type_size and d_type_size_k
	variables.
	* omega.c (resurrect_subs): Remove unused n variable.
	(omega_solve_geq): Remove unused neweqns variable.
	* lto-streamer-in.c (lto_read_tree): Remove unused end_marker variable.
	* tree-inline.c (declare_return_variable): Remove USE_P argument,
	return use instead of var.
	(remap_decl, remap_block): Remove unused fn variable.
	(expand_call_inline): Remove unused retvar variable, adjust
	declare_return_variable caller.
	(optimize_inline_calls): Remove unused prev_fn variable.
	* tree-vect-slp.c (vect_analyze_slp_instance): Remove unused ncopies
	variable.
	(vect_create_mask_and_perm): Remove unused group_size and dr_chain_size
	variables.
	* tree-ssa-loop-niter.c (split_to_var_and_offset): Handle MINUS_EXPR
	properly.
	* tree-vect-loop.c (vect_analyze_loop_form): Remove unused backedge
	variable.
	(vect_create_epilog_for_reduction): Remove unused bytesize variable.
	* omp-low.c (workshare_safe_to_combine_p): Remove par_entry_bb
	parameter.  Remove unused par_stmt variable.
	(determine_parallel_type): Adjust workshare_safe_to_combine_p caller.
	(expand_omp_sections): Remove unused l1 variable.
	(lower_omp_for): Remove unused ilist variable.
	* tree-loop-distribution.c (mark_nodes_having_upstream_mem_writes):
	Remove unused has_upstream_mem_write_p variable.
	* recog.c (decode_asm_operands): Remove unused noperands variable.
	* tree-ssa-alias.c (refs_may_alias_p_1): Remove unused size1 and
	size2 variable.
	* libgcov.c (__gcov_merge_delta): Remove unused last variable.
	* tree-call-cdce.c (gen_conditions_for_pow_int_base): Remove unused
	base_nm variable.
	(gen_conditions_for_pow): Remove unused ec variable.
	* tree-ssa-sccvn.c (vn_reference_lookup_3): Remove unused size
	variable.
	* ipa-struct-reorg.c (program_redefines_malloc_p): Remove unused
	fndecl variable.
	* tree-ssa-sink.c (statement_sink_location): Remove unused code
	variable.
	* regmove.c (copy_src_to_dest): Remove unused insn_uid and move_uid
	variables.
	* tree-complex.c (create_one_component_var): Remove unused inner_type
	variable.
	* calls.c (emit_call_1): Don't GEN_INT (struct_value_size)
	unnecessarily when GEN_*CALL omits that argument.
	* regrename.c (regrename_optimize): Remove unused regs_seen variable.
	(build_def_use): Remove unused icode variable.
	* ipa-pure-const.c (check_call): Remove unused callee and avail
	variables.
	* tree-dfa.c (add_referenced_var): Remove unused v_ann variable.
	* tree-vect-patterns.c (vect_recog_pow_pattern): Remove unused type
	variable.
	(vect_pattern_recog): Remove unused stmt variable.
	* sel-sched-ir.c (make_regions_from_the_rest): Remove unused
	new_regions variable.
	* postreload.c (reload_cse_simplify_operands): Remove unused mode
	variable.
	* tree-parloops.c (create_call_for_reduction_1): Remove unused
	addr_type variable.
	(create_parallel_loop): Remove unused res variable.
	(gen_parallel_loop): Remove unused nloop variable.
	* tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
	* value-prof.c (gimple_mod_subtract_transform,
	gimple_stringops_transform): Remove unused value variable.
	(gimple_stringops_values_to_profile): Remove unused fcode variable.
	* tree-vrp.c (register_new_assert_for): Remove unused found variable.
	(vrp_visit_switch_stmt): Remove unused n variable.
	* tree-vect-stmts.c (vectorizable_conversion): Remove unused expr
	variable.
	(vectorizable_operation): Remove unused shift_p variable.
	(vectorizable_store): Remove unused first_stmt_vinfo variable.
	* tree-ssa-operands.c (add_stmt_operand): Remove unused v_ann variable.
	* tree-vect-data-refs.c (vect_analyze_data_refs): Remove unused bb
	variable.
	(vect_permute_store_chain): Remove unused scalar_dest variable.
	(vect_supportable_dr_alignment): Remove unused invariant_in_outerloop
	variable.
	* tree-ssa-threadupdate.c (thread_single_edge): Remove unused
	local_info variable.
	* tree-optimize.c (tree_rest_of_compilation): Remove unused node
	variable.
	* optabs.c (expand_binop): Remove unused equiv_value variable.
	(emit_libcall_block): Remove unused prev variable.
	(init_optabs): Remove unused int_mode variable.
	* tree-ssa-structalias.c (scc_visit): Remove unused have_ref_node
	variable.
	(do_structure_copy): Remove unused lhsbase and rhsbase variables.
	(find_func_aliases): Remove unused rhstype variable.
	(ipa_pta_execute): Remove unused varid variable.
gcc/objc/
	* objc-act.c (generate_shared_structures): Remove unused sc_spec and
	decl_specs variables.
	(objc_build_message_expr): Remove unused loc variable.
	(objc_finish_message_expr): Remove unused saved_rtype variable.
	(encode_field_decl): Remove unused type variable.
gcc/lto/
	* lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
	variable.

From-SVN: r154726
2009-11-28 17:21:00 +01:00
Jakub Jelinek 76dcaf33d5 re PR objc++/42156 (Hundreds of objc++ testsuite regressions)
PR obj-c++/42156
	* objc-act.c (objc_build_struct): INIT_TYPE_OBJC_INFO for
	type variants that don't have it initialized yet.

From-SVN: r154721
2009-11-28 13:12:32 +01:00
Jan Hubicka 870875e66e * objc-act.c (objc_add_static_instance): Do not set DECL_COMMON.
From-SVN: r154173
2009-11-13 20:05:56 +00:00
Richard Henderson 1d65f45cfa Squash commit of EH in gimple
From-SVN: r151696
2009-09-14 12:18:58 -07:00
Richard Guenther f9417da1a2 langhooks-def.h (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
2009-09-13  Richard Guenther  <rguenther@suse.de>
	Rafael Avila de Espindola  <espindola@google.com>

	* langhooks-def.h (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
	(LANG_HOOKS_EH_PERSONALITY): Likewise.
	(LANG_HOOKS_INITIALIZER): Adjust.
	(lhd_pass_through_t): Declare.
	* langhooks.h (struct lang_hooks): Add eh_runtime_type and
	eh_personality.
	* langhooks.c (lhd_pass_through_t): New function.

        * dwarf2out.c (output_call_frame_info, dwarf2out_do_cfi_startproc,
	dwarf2out_begin_prologue): Use personality from current_function_decl.
        * expr.h (get_personality_function): Declare.
	* expr.c (get_personality_function): New function.
	(build_personality_function): Likewise.
        * libfuncs.h (libfunc_index): Remove LTI_eh_personality.
        (eh_personality_libfunc): Remove.
        * optabs.c (build_libfunc_function): New function split out from ...
	(init_one_libfunc): ... here.
        * tree.h (DECL_FUNCTION_PERSONALITY): New.
        (tree_function_decl): Add personality.
	(lhd_gcc_personality): Declare.
	(build_personality_function): Likewise.
	* tree.c (gcc_eh_personality_decl): New.
	(lhd_gcc_personality): New function.
	* except.h (lang_eh_runtime_type): Remove.
	(enum eh_personality_kind): New.
	(build_personality_function): Declare.
	(function_needs_eh_personality): Declare.
        * except.c (lang_eh_runtime_type): Remove.
	(function_needs_eh_personality): New function.
	(add_type_for_runtime): Call lang_hooks.type_for_runtime instead.
        (sjlj_emit_function_enter, output_function_exception_table):
        Use personality from current_function_decl.
	* tree-eh.c (lower_eh_constructs): Set DECL_FUNCTION_PERSONALITY.
	* tree-inline.c (tree_can_inline_p): Do not inline across different
	EH personalities.
	(expand_call_inline): Likewise.  Adjust the callers EH personality.
	(tree_function_versioning): Copy DECL_FUNCTION_PERSONALITY.
	* cgraph.c (cgraph_add_new_function): Set DECL_FUNCTION_PERSONALITY.
	* Makefile.in (cgraph.o): Add $(EXCEPT_H) dependency.
	(c-parser.o): Likewise

	* c-tree.h (c_eh_initialized_p): Remove.
	(c_maybe_initialize_eh): Likewise.
	* c-decl.c (finish_decl): Don't call c_maybe_initialize_eh.
	(finish_decl): Don't call c_maybe_initialize_eh.
	(c_eh_initialized_p): Remove.
	(c_maybe_initialize_eh): Likewise.
        * c-parser.c (c_parser_omp_construct): Likewise.
	(c_parse_file): Initialize exception handling.

	objc/
	* objc-act.c (objc_eh_runtime_type): Export.
	(objc_init_exceptions): Remove.  Move warning code ...
	(objc_begin_try_stmt): ... here
	(objc_build_throw_stmt): ... and here.
	(objc_eh_personality_decl): New.
	(objc_eh_personality): New function.
	* objc-act.h (objc_eh_runtime_type): Declare.
	(objc_eh_personality): Likewise.
	* objc-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
	(LANG_HOOKS_EH_PERSONALITY): Likewise.

	cp/
	* except.c (init_exception_processing): Do not set
	lang_eh_runtime_type.
	(choose_personality_routine): Do not set eh_personality_decl,
	set pragma_java_exceptions.
	* cp-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define.
	(LANG_HOOKS_EH_PERSONALITY): Likewise.
	(cp_eh_personality_decl): New.
	(cp_eh_personality): Likewise.
	* Make-lang.in (cp-lang.o): Add $(EXPR_H) and $(EXCEPT_H)
	dependencies.

	java/
	* decl.c (do_nothing): Remove.
	(java_init_decl_processing): Do not set lang_eh_runtime_type.
	* Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
	* lang.c (java_eh_personality): New.
	(java_eh_personality_decl): Likewise.
	(LANG_HOOKS_EH_PERSONALITY): Define.

	ada/
	* gcc-interface/misc.c (gnat_init_gcc_eh): Do not set
	lang_eh_runtime_type.
	(LANG_HOOKS_EH_PERSONALITY): Define.
	(gnat_eh_personality_decl): New.
	(gnat_eh_personality): Likewise.
	* Make-lang.in (misc.o): Add gt-ada-misc.h dependency.
	* config-lang.in (gtfiles): Add misc.c.

	fortran/
	* f95-lang.c (gfc_maybe_initialize_eh): Do not init
	eh_personality_libfunc.

Co-Authored-By: Rafael Avila de Espindola <espindola@google.com>

From-SVN: r151676
2009-09-13 19:40:33 +00:00
Diego Novillo 4537ec0c86 [multiple changes]
2009-09-01  Diego Novillo  <dnovillo@google.com>

	* c-lang.c (lang_hooks): Remove const qualifier.

java/ChangeLog

	* lang.c (lang_hooks): Remove const qualifier.

objc/ChangeLog

	* objc-lang.c (lang_hooks): Remove const qualifier.

objcp/ChangeLog

	* objcp-lang.c (lang_hooks): Remove const qualifier.

ada/ChangeLog

	* gcc-interface/misc.c (lang_hooks): Remove const qualifier.

fortran/ChangeLog

	* f95-lang.c (lang_hooks): Remove const qualifier.

cp/ChangeLog

	* cp-lang.c (lang_hooks): Remove const qualifier.

2009-09-01  Diego Novillo  <dnovillo@google.com>

	* cgraph.c (cgraph_node_for_decl): New.
	* cgraph.h (cgraph_node_for_decl): Declare.
	* tree.c (host_integerp): Return 0 if T is NULL.


2009-09-01  Diego Novillo  <dnovillo@google.com>

	* tree.h (struct alias_pair): Move from varasm.c.
	(alias_pairs): Likewise.
	(TYPE_MAXVAL): Define.
	(TYPE_MINVAL): Define.
	(iterative_hash_host_wide_int): Declare.
	(remove_unreachable_alias_pairs): Declare.
	* tree-pass.h (pass_ipa_free_lang_data): Declare.
	* diagnostic.c (default_diagnostic_starter): Make extern.
	(default_diagnostic_finalizer): Make extern.
	* diagnostic.h (default_diagnostic_starter): Declare.
	(default_diagnostic_finalizer): Declare.
	(default_tree_printer): Declare.
	* toplev.c (default_tree_printer): Make extern.


2009-09-01  Richard Guenther  <rguenther@suse.de>
	    Diego Novillo  <dnovillo@google.com>

	* cgraph.c (cgraph_add_new_function): Remove gimplification.
	* cgraphunit.c (cgraph_expand_function): Do not emit
	associated thunks from here.
	(cgraph_emit_thunks): New.
	(cgraph_optimize): Call it.
	Return if any IPA pass finds an error.
	* varasm.c (finish_aliases_1): Ignore errorneous aliases used
	by thunks.


2009-09-01  Simon Baldwin  <simonb@google.com>
	    Rafael Espindola  <espindola@google.com>
	    Richard Guenther  <rguenther@suse.de>
	    Doug Kwan  <dougkwan@google.com>
	    Diego Novillo  <dnovillo@google.com>

	* tree.c: Include tree-pass.h, langhooks-def.h,
	diagnostic.h, cgraph.h, timevar.h, except.h and debug.h.
	(free_lang_data_in_type): New.
	(need_assembler_name_p): New.
	(free_lang_data_in_block): New.
	(free_lang_data_in_decl): New.
	(struct free_lang_data_d): New.
	(add_tree_to_fld_list): New.
	(find_decls_types_r): New.
	(get_eh_types_for_runtime): New.
	(find_decls_types_in_eh_region): New.
	(find_decls_types_in_node): New.
	(find_decls_types_in_var): New.
	(free_lang_data_in_cgraph): New.
	(free_lang_data): New.
	(gate_free_lang_data): New.
	(pass_ipa_free_lang_data): New.

2009-09-01  Diego Novillo  <dnovillo@google.com>

	* timevar.def (TV_IPA_FREE_LANG_DATA): Define.
	* langhooks.h (struct lang_hooks): Add field free_lang_data.
	(lang_hooks): Remove const qualifier.
	* ipa.c (cgraph_remove_unreachable_nodes): Call
	remove_unreachable_alias_pairs.
	* except.c (add_type_for_runtime): Check if TYPE has
	already been converted.
	(lookup_type_for_runtime): Likewise.
	(check_handled): Handle converted types.
	* varasm.c (remove_unreachable_alias_pairs): New.
	* gimple.c: Include demangle.h.
	(gimple_decl_printable_name): New.
	(gimple_fold_obj_type_ref): New.
	* gimple.h (gimple_decl_printable_name): Declare.
	(gimple_fold_obj_type_ref): Declare.
	* passes.c (init_optimization_passes): Add pass
	pass_ipa_free_lang_data.
	* langhooks-def.h (LANG_HOOKS_FREE_LANG_DATA): Define.
	(LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_FREE_LANG_DATA.

testsuite/ChangeLog

2009-09-01  Diego Novillo  <dnovillo@google.com>

	* gcc.dg/gomp/combined-1.c: Adjust expected pattern.
	* g++.dg/tree-prof/inline_mismatch_args.C: Likewise.
	* g++.dg/warn/unit-1.C: Likewise.
	* g++.dg/ipa/iinline-1.C: Likewise.
	* g++.dg/template/cond2.C: Adjust expected line location for the
	error.
	* g++.dg/template/pr35240.C: Likewise.


cp/ChangeLog

2009-09-01  Doug Kwan  <dougkwan@google.com>

	* tree.c (cp_fix_function_decl_p): New.
	(cp_free_lang_data): New.

2009-09-01  Diego Novillo  <dnovillo@google.com>

	* Make-lang.in (decl2.o): Add dependency on $(POINTER_SET_H).
	* decl2.c: Include pointer-set.h.
	(collect_candidates_for_java_method_aliases): New.
	(cp_write_global_declarations): Call it.
	Add local variable CANDIDATES.  If set, call
	build_java_method_aliases.
	(build_java_method_aliases): Add argument CANDIDATES.
	Use it to determine if FNDECL should get a hidden alias.
	* cp-objcp-common.h (LANG_HOOKS_FREE_LANG_DATA): Define.
	* cp-tree.h (cp_free_lang_data): Declare.

2009-09-03  Richard Guenther  <rguenther@suse.de>

	* method.c (use_thunk): Use cgraph_finalize_function to hand
	off thunks to the cgraph.
	* semantics.c (emit_associated_thunks): Do not emit thunks
	for really extern functions.

From-SVN: r151360
2009-09-03 00:07:12 -04:00
Richard Guenther 29cc57cf00 c-objc-common.h (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Do not define.
2009-08-20  Richard Guenther  <rguenther@suse.de>

	* c-objc-common.h (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Do not
	define.
	* c-tree.h (c_dup_lang_specific_decl): Remove.
	(struct lang_decl, struct lang_type): Move definitions ...
	* c-lang.h: ... here.  New file.
	* c-decl.c: Include c-lang.h.
	(c_dup_lang_specific_decl): Remove.
	* c-typeck.c: Include c-lang.h.
	* Makefile.in (c-decl.o): Add c-lang.h dependency.
	(c-typeck.o): Likewise.
	* c-config-lang.in (gtfiles): Add c-lang.h.
	* gengtype.c (get_output_file_with_visibility): Handle c-lang.h
	like c-tree.h.

	objc/
	* objc-act.c: Include c-lang.h
	* Make-lang.in (objc/objc-act.o): Add c-lang.h dependency.

From-SVN: r150966
2009-08-20 16:11:37 +00:00
Aldy Hernandez db3927fb49 re PR c/40435 (Revision 148442 caused many regressions on trunk)
2009-07-17  Aldy Hernandez  <aldyh@redhat.com>
	    Manuel López-Ibáñez  <manu@gcc.gnu.org>

	PR 40435 
	* tree-complex.c, tree-loop-distribution.c,
	tree.c, tree.h, builtins.c, fold-const.c, omp-low.c,
	cgraphunit.c, tree-ssa-ccp.c, tree-ssa-dom.c,
	gimple-low.c, expr.c, tree-ssa-ifcombine.c, c-decl.c,
	stor-layout.c, tree-if-conv.c, c-typeck.c,
	gimplify.c, calls.c, tree-sra.c, tree-mudflap.c,
	tree-ssa-copy.c, tree-ssa-forwprop.c, c-convert.c, c-omp.c,
	varasm.c, tree-inline.c, c-common.c,
	c-common.h, gimple.c, tree-switch-conversion.c, gimple.h,
	tree-cfg.c, c-parser.c, convert.c: Add location
	argument to fold_{unary,binary,ternary}, fold_build[123],
	build_call_expr, build_size_arg, build_fold_addr_expr,
	build_call_array, non_lvalue, size_diffop,
	fold_build1_initializer, fold_build2_initializer,
	fold_build3_initializer, fold_build_call_array,
	fold_build_call_array_initializer, fold_single_bit_test,
	omit_one_operand, omit_two_operands, invert_truthvalue,
	fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref,
	combine_comparisons, fold_builtin_*, fold_call_expr,
	build_range_check, maybe_fold_offset_to_address, round_up,
	round_down.
objc/
	* objc-act.c: Add location argument to all calls to
	build_fold_addr_expr.
testsuite/
	* gcc.dg/pr36902.c: Add column info.
	* g++.dg/gcov/gcov-2.C: Change count for definition.
cp/
	* typeck.c, init.c, class.c, method.c, rtti.c, except.c, error.c,
	tree.c, cp-gimplify.c, cxx-pretty-print.c, pt.c, semantics.c,
	call.c, cvt.c, mangle.c: Add location argument to
	fold_{unary,binary,ternary}, fold_build[123], build_call_expr,
	build_size_arg, build_fold_addr_expr, build_call_array,
	non_lvalue, size_diffop, fold_build1_initializer,
	fold_build2_initializer, fold_build3_initializer,
	fold_build_call_array, fold_build_call_array_initializer,
	fold_single_bit_test, omit_one_operand, omit_two_operands,
	invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref,
	fold_indirect_ref, combine_comparisons, fold_builtin_*,
	fold_call_expr, build_range_check, maybe_fold_offset_to_address,
	round_up, round_down.
fortran/
	* trans-expr.c, trans-array.c, trans-openmp.c, trans-stmt.c,
	trans.c, trans-io.c, trans-decl.c, trans-intrinsic.c: Add location
	argument to fold_{unary,binary,ternary}, fold_build[123],
	build_call_expr, build_size_arg, build_fold_addr_expr,
	build_call_array, non_lvalue, size_diffop,
	fold_build1_initializer, fold_build2_initializer,
	fold_build3_initializer, fold_build_call_array,
	fold_build_call_array_initializer, fold_single_bit_test,
	omit_one_operand, omit_two_operands, invert_truthvalue,
	fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref,
	combine_comparisons, fold_builtin_*, fold_call_expr,
	build_range_check, maybe_fold_offset_to_address, round_up,
	round_down.

Co-Authored-By: Manuel López-Ibáñez <manu@gcc.gnu.org>

From-SVN: r149722
2009-07-16 22:29:52 +00:00
Taras Glek 2a4c03661e sourcebuild.texi: Document install-plugin target.
2009-07-14  Taras Glek  <tglek@mozilla.com>
	    Rafael Espindola  <espindola@google.com>

	* doc/sourcebuild.texi: Document install-plugin target.
	* configure.ac: Added install-plugin target to language makefiles.
	* configure: Regenerate.
	* Makefile.in: (install-plugin): Install more headers,
	depend on lang.install-plugin.

ada/ChangeLog

	* gcc-interface/Make-lang.in (ada.install-plugin): New target for
	installing plugin headers.

cp/ChangeLog

	* Make-lang.in: Added CP_PLUGIN_HEADERS and
	c.install-target to export cp-tree.h cxx-pretty-print.h
	name-lookup.h headers for plugins.

fortran/ChangeLog

	* Make-lang.in (fortran.install-plugin): New target for
	installing plugin headers.

java/ChangeLog

	* Make-lang.in (java.install-plugin): New target for
	installing plugin headers.

objc/ChangeLog

	* Make-lang.in (objc.install-plugin): New target for
	installing plugin headers.

objcp/ChangeLog

	* Make-lang.in (obj-c.install-plugin): New target for
	installing plugin headers.



Co-Authored-By: Rafael Avila de Espindola <espindola@google.com>

From-SVN: r149648
2009-07-14 18:25:23 -04:00
Manuel López-Ibáñez 5e278028ed tree.c (set_expr_locus): Remove.
2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* tree.c (set_expr_locus): Remove.
	* tree.h (EXPR_LOCUS,SET_EXPR_LOCUS,set_expr_locus): Remove.
	* c-typeck.c (c_finish_stmt_expr):  Replace EXPR_LOCUS by
	EXPR_LOCATION.
	* gimplify.c (internal_get_tmp_var): Likewise.
	(gimplify_call_expr): Likewise.
	(gimplify_one_sizepos): Likewise.
objc/
	* objc-act.c (next_sjlj_build_catch_list): Replace EXPR_LOCUS by
	EXPR_LOCATION.
cp/	
	* semantics.c (finalize_nrv_r): Replace EXPR_LOCUS by
	EXPR_LOCATION.
ada/
	* gcc-interface/trans.c (gnat_gimplify_expr):  Replace EXPR_LOCUS by
	EXPR_LOCATION.

From-SVN: r149350
2009-07-07 21:52:01 +00:00
Manuel López-Ibáñez c5d753640d cgraphunit.c: Replace %J by an explicit location.
2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* cgraphunit.c: Replace %J by an explicit location. Update all
	calls.
	* c-decl.c: Likewise.
	* function.c: Likewise.
	* varasm.c: Likewise.
	* tree-ssa.c: Likewise.
	* c-common.c: Likewise.
	* tree-cfg.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/v850/v850.c: Likewise.
java/	
	* class.c: Replace %J by an explicit location. Update all calls.
objc/	
	* objc-act.c: Replace %J by an explicit location. Update all
	calls.
cp/
	* init.c: Replace %J by an explicit location. Update all calls.
	* decl.c: Likewise.
	* typeck2.c: Likewise.
	* pt.c: Likewise.
	* name-lookup.c: Likewise.

From-SVN: r149312
2009-07-07 02:55:59 +00:00
Manuel López-Ibáñez fab922b1f5 c-lex.c: Replace %H by an explicit location.
2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* c-lex.c: Replace %H by an explicit location. Update all calls.
	* c-common.c: Likewise.
	* c-decl.c: Likewise.
	* c-typeck.c: Likewise.
	* fold-const.c: Likewise.
	* gimplify.c: Likewise.
	* stmt.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-vrp.c: Likewise.
	* value-prof.c: Likewise.
java/
	* jcf-parse.c: Replace %H by an explicit location. Update all calls.
objc/
	* objc-act.c: Replace %H by an explicit location. Update all calls.
testsuite/
	* gcc.dg/plugin/selfassign.c: Replace %H by an explicit
	location. Update all calls.
	* g++.dg/plugin/selfassign.c: Likewise.

From-SVN: r149310
2009-07-07 02:10:19 +00:00
Matthias Klose 0a7d7dea56 re PR objc++/28050 (ICE on invalid initializer)
gcc/
2009-06-22  Steven Bosscher  <steven@gcc.gnu.org>

        PR objc/28050
        * c-parser.c (c_parser_objc_message_args): Return error_mark_node
        instead of NULL if a parser error occurs.

gcc/objc/
2009-06-22  Steven Bosscher  <steven@gcc.gnu.org>

        PR objc/28050
        * objc-act.c (objc_build_message_args): Return if ARGS is the
        error_mark_node.

gcc/testsuite/
2009-06-22  Matthias Klose  <doko@ubuntu.com>

        PR objc/28050
        * pr28050.m: New testcase.

From-SVN: r148804
2009-06-22 15:18:38 +00:00
Ian Lance Taylor dc491a250a dse.c (struct store_info): Rename bitmap field to bmap.
./:	* dse.c (struct store_info): Rename bitmap field to bmap.  Change
	all uses.

	* c-decl.c (in_struct, struct_types): Remove.
	(struct c_binding): Add in_struct field.
	(c_binding_ptr): Define type, along with VEC.
	(struct c_struct_parse_info): Define.
	(struct_parse_info): New static variable.
	(bind): Initialize in_struct field.
	(start_struct): Remove enclosing_in_struct and
	enclosing_struct_types parameters.  Add
	enclosing_struct_parse_info parameter.  Change all callers.  Set
	struct_parse_info rather than in_struct and struct_types.
	(grokfield): If -Wc++-compat and there is a symbol binding for the
	field name, set the in_struct flag and push it on the
	struct_parse_info->fields vector.
	(warn_cxx_compat_finish_struct): New static function.
	(finish_struct): Remove enclosing_in_struct and
	enclosing_struct_types parameters.  Add
	enclosing_struct_parse_info parameter.  Change all callers.  Don't
	set C_TYPE_DEFINED_IN_STRUCT here.  Call
	warn_cxx_compat_finish_struct.  Free struct_parse_info and set to
	parameter.  Only push on struct_types if warn_cxx_compat.
	(finish_enum): Only push on struct_types if warn_cxx_compat.
	(declspecs_add_type): Add loc parameter.  Change all callers.
	Change all error calls to error_at.  Pass loc, not input_location,
	to pedwarn calls.  Warn if -Wc++-compat and a typedef name is
	defined in a struct.  If -Wc++-compat and parsing a struct, record
	that a typedef name was used.
	* c-parser.c (c_parser_declspecs): Get location to pass to
	declspecs_add_type.
	(c_parser_struct_or_union_specifier): Update calls to start_struct
	and finish_struct.
	* c-tree.h (struct c_struct_parse_info): Declare.
	(finish_struct, start_struct): Update declarations.
	(declspecs_add_type): Update declaration.
objc/:
	* objc-act.c (objc_in_struct, objc_struct_types): Remove.
	(objc_struct_info): New static variable.
	(objc_start_struct): Pass &objc_struct_info, not &objc_in_struct
	and &objc_struct_types, to start_struct.
	(objc_finish_struct): Likewise for finish_struct.
objcp/:
	* objcp-decl.h (start_struct): Remove in_struct and struct_types
	parameters.  Add struct_info parameter.
	(finish_struct): Likewise.
testsuite/:
	* gcc.dg/Wcxx-compat-15.c: New testcase.

From-SVN: r148709
2009-06-19 15:29:18 +00:00
Ian Lance Taylor e1b7793c8e df-problems.c (df_simulate_one_insn_forwards): Fix braces in switch.
./:	* df-problems.c (df_simulate_one_insn_forwards): Fix braces in
	switch.
	* gcov.c (read_count_file): Add braces around variables declared
	before label.

	* c.opt (Wjump-misses-init): New warning.
	* c-opts.c (c_common_handle_option): Set warn_jump_misses_init for
	-Wall and -Wc++-compat if not already set.
	(c_common_post_options): Clear warn_jump_misses_init if it was not
	set.
	* c-decl.c (struct c_binding): Change type field to a union with
	new label field.  Make it the first field in the struct.  Update
	references to type to use u.type instead.
	(struct c_spot_bindings): Define.
	(struct c_goto_bindings): Define.
	(c_goto_bindings_p): Define, along with VECs.
	(struct c_label_vars): Define.
	(struct c_scope): Add has_label_bindings field.
	(bind_label, set_spot_bindings): New static functions.
	(decl_jump_unsafe, update_spot_bindings): New static functions.
	(update_label_decls): New static function.
	(pop_scope): Call update_label_decls.  Don't call c_end_vm_scope.
	Update binding u.label field to shadowed field.
	(c_binding_start_stmt_expr): New function.
	(c_binding_end_stmt_expr): New function.
	(pushdecl): Don't call c_begin_vm_scope.
	(make_label): Add defining and p_label_vars parameters.  Change
	all callers.
	(lookup_label): Correct test for whether a label has not yet been
	defined.  Call bind_label rather than bind.
	(warn_about_goto): New static function.
	(lookup_label_for_goto): New function.
	(declare_label): Call bind_label rather than bind.
	(check_earlier_gotos): New static function.
	(define_label): Don't give errors about jumping into statement
	expressions or scopes of variably modified types.  Call
	set_spot_bindings and check_earlier_gotos.  Call bind_label
	instead of bind.  Don't set label_context_stack_se or
	label_context_stack_vm.
	(c_get_switch_bindings): New function.
	(c_release_switch_bindings): New function.
	(c_check_switch_jump_warnings): New function.
	(start_function): Don't set label_context_stack_se or
	label_context_stack_vm.
	(finish_function): Likewise.
	* c-typeck.c (label_context_stack_se): Don't define.
	(label_context_stack_vm): Don't define.
	(c_finish_goto_label): Call lookup_label_for_goto rather than
	lookup_label.  Don't give errors about jumping into a statement
	expression or the scope of a variably modified type.  Don't set
	label_context_stack_se or label_context_stack_vm.
	(struct c_switch): Remove blocked_stmt_expr and blocked_vm
	fields.  Add bindings field.
	(c_start_case): Don't set deleted fields.  Set bindings field.
	(do_case): Rework order of tests.  Don't check blocked_stmt_expr
	or blocked_vm.  Call c_check_switch_jump_warnings.
	(c_finish_case): Don't test blocked_stmt_expr field.  Call
	c_release_switch_bindings.
	(c_begin_stmt_expr): Don't increment blocked_stmt_expr in
	c_switch_stack.  Don't walk label_context_stack_se labels.  Don't
	set label_context_stack_se.  Call c_bindings_start_stmt_expr.
	(c_finish_stmt_expr): Don't decrement blocked_stmt_expr in
	c_switch_stack.  Don't walk label_context_stack_se labels.  Don't
	set label_context_stack_se.  Call c_bindings_end_stmt_expr.
	(c_begin_vm_scope, c_end_vm_scope): Don't define.
	* c-tree.h (C_DECL_UNJUMPABLE_STMT_EXPR): Don't define.
	(C_DECL_UNDEFINABLE_STMT_EXPR): Don't define.
	(C_DECL_UNJUMPABLE_VM): Don't define.
	(C_DECL_UNDEFINABLE_VM): Don't define.
	(struct c_label_list): Don't define.
	(struct c_label_context_se): Don't define.
	(struct c_label_context_vm): Don't define.
	(struct c_spot_bindings): Declare.
	(c_bindings_start_stmt_expr): Declare.
	(c_bindings_end_stmt_expr): Declare.
	(lookup_label_for_goto): Declare.
	(c_get_switch_bindings, c_release_switch_bindings): Declare.
	(c_check_switch_jump_warnings): Declare.
	(label_context_stack_se, label_context_stack_vm): Don't declare.
	(c_finish_goto_label): Update declaration.
	(c_begin_vm_scope, c_end_vm_scope): Don't declare.
	* doc/invoke.texi (Option Summary): Mention -Wjump-misses-init.
	(Warning Options): Document -Wjump-misses-init.
cp/:
	* parser.c (cp_parser_direct_declarator): Add braces around
	variables declared before label.
objc/:
	* objc-act.c (objc_start_function): Don't set
	label_context_stack_se or label_context_stack_vm.
testsuite/:
	* gcc.dg/Wjump-misses-init-1.c: New testcase.
	* gcc.dg/Wjump-misses-init-2.c: New testcase.
	* gcc.dg/c99-vla-jump-5.c: Adjust expected error messages.
	Recognize new notes.
	* gcc.dg/stmt-expr-label-2.c: Likewise.
	* gcc.dg/c99-vla-jump-1.c: Recognize new notes.  Fix column
	numbers.
	* gcc.dg/c99-vla-jump-2.c: Recognize new notes.
	* gcc.dg/c99-vla-jump-3.c: Recognize new notes.
	* gcc.dg/c99-vla-jump-4.c: Likewise.
	* gcc.dg/stmt-expr-label-1.c: Likewise.
	* gcc.dg/stmt-expr-label-3.c: Likewise.
	* gcc.dg/vla-8.c: Likewise.  Move error message to different
	line.

From-SVN: r148512
2009-06-16 05:12:15 +00:00
Aldy Hernandez c2255bc488 java-gimplify.c (java_gimplify_block): New argument to build_empty_stmt.
gcc/java/
	* java-gimplify.c (java_gimplify_block): New argument to
	build_empty_stmt.
	* expr.c (force_evaluation_order): Same.
	* typeck.c: Add location to build_decl or PUSH_FIELD calls.
	* class.c: Same.
	* decl.c: Same.
	* jcf-parse.c: Same.
	* constants.c: Same.
	* resource.c: Same.
	* except.c: Same.
	* builtins.c: Same.
	* expr.c: Same.
	* java-tree.h (PUSH_FIELD): Add location field.
gcc/objc/
	* objc-act.c (finish_var_decl): Pass location to finish_decl.
	(objc_get_parm_info): Same.
	(get_super_receiver): Same.
	* objc-act.c (objc_build_component_ref): Pass location to
	build_compound_ref.
	(build_module_initializer_routine): Pass location to
	c_end_compound_stmt.
	(objc_generate_static_init_call): Pass location to build_stmt.
	(build_typed_selector_reference): New location argument.
	(build_selector_reference): Same.
	(objc_substitute_decl): Pass location to build_array_ref.
	(next_sjlj_build_try_catch_finally): Pass location to build_stmt.
	(objc_begin_catch_clause): Same.
	(objc_finish_try_stmt): Same.
	(objc_finish_catch_clause): Pass location to c_end_compound_stmt.
	(objc_build_throw_stmt): New argument.
	(generate_shared_structures): Pass location to build_c_cast.
	(objc_build_message_expr): Use local location.
	(objc_finish_message_expr): Use input_location.
	(build_objc_method_call): New argument.
	(objc_build_selector_expr): Same.
	(get_super_receiver): Pass location to build_c_cast,
	build_modify_expr, build_compound_expr.
	* objc-act.c: Add location to all calls to start_struct, build_decl,
	finish_struct.
gcc/
	* tree-pretty-print.c (dump_generic_node): Dump column numbers.
	* gimple-pretty-print.c (dump_gimple_stmt): Same.
	* gimplify.c (gimplify_modify_expr): Set location for GIMPLE_ASSIGNs
	created.
	* c-parser.c (c_parser_binary_expression): Use current column while
	building binary operations.
	* common.opt (fshow-column): Enable by default.
	* tree-vrp.c (check_array_ref): Use warning_at.
	(check_array_bounds): Use location from call back if expr has no
	location.
	* tree.h: Add location argument to maybe_fold_*.
	* tree-ssa-ccp.c (ccp_fold): Pass location to maybe_fold_*.
	(maybe_fold_offset_to_array_ref): Add location argument and use it.
	(maybe_fold_offset_to_component_ref): Same.
	(maybe_fold_offset_to_reference): Same.
	(maybe_fold_offset_to_address): Same.
	(maybe_fold_stmt_indirect): Same.
	(maybe_fold_stmt_addition): Same.
	(fold_stmt_r): Pass location to maybe_fold_*.
	(fold_gimple_assign): Same.
	* c-tree.h: Add location argument to finish_decl,
	default_function_array_conversion, store_init_value.
	* c-decl.c (define_label): Use error_at.
	(c_make_fname_decl): Pass location to finish_decl.
	(finish_decl): New location argument.
	(build_compound_literal): Pass location to store_init_value.
	(grokdeclarator): Pass location to finish_decl.
	(grokfield): Same.
	* c-typeck.c (array_to_pointer_conversion): New location argument.
	(function_to_pointer_conversion): Same.
	(default_function_array_conversion): Same.
	(parser_build_unary_op): Pass location to overflow_warning.
	(parser_build_binary_op): Same.  Use warning_at.
	(build_unary_op): Pass location to array_to_pointer_conversion.
	(build_c_cast): Pass location to digest_init.
	(build_modify_expr): New location argument.
	(convert_for_assignment): Same.
	(store_init_value): Same.
	(digest_init): Same.
	(output_init_element): Pass location to digest_init and
	array_to_pointer_conversion.
	(c_finish_return): Pass location to convert_for_assignment.
	* gimplify.c (gimplify_conversion): Pass location to
	maybe_fold_offset_to_address.
	* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Pass location
	to maybe_fold_stmt_addition.
	* c-omp.c (c_finish_omp_atomic): Pass new location to
	build_modify_expr.
	(c_finish_omp_for): Same.
	* c-common.c (overflow_warning): New argument.
	* c-common.h: New argument to build_modify_expr, overflow_warning.
	* c-parser.c (c_parser_declaration_or_fndef): Pass location to
	finish_decl.
	(c_parser_initializer): Pass location to
	default_function_array_conversion.
	(c_parser_initelt): Same.
	(c_parser_initval): Same.
	(c_parser_asm_operands): Same.
	(c_parser_expr_no_commas): Same.  Pass location to build_modify_expr.
	(c_parser_conditional_expression): Same.
	(c_parser_binary_expression): Add location info to stack.  Use it.
	(c_parser_unary_expression): Pass location to
	default_function_array_conversion, parser_build_unary_op,
	build_indirect_ref, c_parser_postfix_expression_after_primary.
	(c_parser_postfix_expression_after_primary): New location argument.
	Use it.
	(c_parser_expression_conv): Pass location to
	default_function_array_conversion.
	(c_parser_expr_list): Same.
	(c_parser_omp_atomic): Same.
	(c_parser_omp_for_loop): Same.
	* c-tree.h: (struct c_declarator): Add comment to id_loc.
	(build_array_declarator): New argument.
	* c-decl.c (build_array_declarator): Add location argument.
	(grokdeclarator): Set id_loc for cdk_array.
	* c-parser.c (c_parser_direct_declarator_inner): Pass location to
	build_array_declarator.
	* tree.c (build_omp_clause): Add location argument.
	* tree.h (OMP_CLAUSE_HAS_LOCATION): New macro.
	(OMP_CLAUSE_LOCATION): New macro.
	(struct tree_omp_clause): Add location field.
	(build_omp_clause): Add argument.
	* testsuite/gcc.dg/gomp/for-1.c: Fix column.
	* cp/pt.c (tsubst_omp_for_iterator): Pass location to
	build_omp_clause.
	* cp/parser.c (cp_parser_omp_var_list_no_open): Same.
	(cp_parser_omp_clause_collapse): Same.
	(cp_parser_omp_clause_default): Same.
	(cp_parser_omp_clause_if): Same.
	(cp_parser_omp_clause_nowait): Same.
	(cp_parser_omp_clause_num_threads): Same.
	(cp_parser_omp_clause_ordered): Same.
	(cp_parser_omp_clause_schedule): Same.
	(cp_parser_omp_clause_untied): Same.
	(cp_parser_omp_for_loop): Same.
	(cp_parser_omp_parallel): Pass location to c_split_parallel_clauses.
	* c-tree.h (c_start_case): Add location argument.
	(c_process_expr_stmt): Same.
	(c_finish_goto_*): Same.
	* tree-parloops.c (initialize_reductions): Pass location to
	build_omp_clause.
	(create_parallel_loop): Same.
	* fortran/trans-openmp.c (gfc_trans_omp_variable_list): Same.
	(gfc_trans_omp_reduction_list): Same.
	(gfc_trans_omp_clauses): Same.
	(gfc_trans_omp_do): Same.
	* c-typeck.c (c_finish_goto_label): Same.
	(c_finish_goto_ptr): New location argument.
	(c_start_case): Same.
	(emit_side_effect_warnings): Same.
	(c_process_expr_stmt): Same.
	(c_finish_stmt_expr): Same.
	(c_finish_omp_clauses): Use error_at instead of error.
	* gimplify.c (gimplify_adjust_omp_clauses_1): Pass location to
	build_omp_clause.
	* c-omp.c (c_split_parallel_clauses): New location argument.
	* tree-nested.c (convert_nonlocal_reference_stmt): Pass location
	to build_omp_clause.
	(convert_local_reference_stmt): Same.
	(convert_gimple_call): Same.
	* c-common.h (c_split_parallel_clauses): New argument.
	* c-parser.c (c_parser_statement_after_labels): Pass location to
	c_finish_goto_label.
	(c_parser_switch_statement): Pass location to c_start_case.
	(c_parser_for_statement): Pass location to c_finish_expr_stmt,
	and c_process_expr_stmt.
	(c_parser_omp_variable_list): Add location argument.
	(c_parser_omp_clause_collapse): Pass location to
	build_omp_clause.
	(c_parser_omp_clause_default): Same.
	(c_parser_omp_clause_if): Same.
	(c_parser_omp_clause_num_threads): Same.
	(-c_parser_omp_clause_ordered): Same.
	(c_parser_omp_clause_reduction): Pass location to
	c_parser_omp_variable_list.
	(c_parser_omp_clause_schedule): Pass location to build_omp_clause.
	(c_parser_omp_clause_untied): Same.
	(c_parser_omp_for_loop): Pass location to c_process_expr_stmt.
	(c_parser_omp_parallel): Pass location to
	c_split_parallel_clauses.
	* c-tree.h (check_for_loop_decls, undeclared_variable,
	build_component_ref, build_array_ref, build_external_ref,
	c_expr_sizeof_expr, c_expr_sizeof_type, parser_build_unary_op,
	build_conditional_expr, build_compound_expr, c_cast_expr,
	build_c_cast, build_asm_expr, c_end_compound_stmt, c_finish_stmt_expr,
	c_finish_return, c_finish_omp_parallel, c_finish_omp_task): New
	argument.
	* c-semantics.c (build_stmt): Same.
	(build_case_label): Same.
	* c-decl.c (c_finish_incomplete_decl): Pass location on down.
	(undeclared_variable): New argument.
	(make_label): Same.
	(lookup_label): Pass location on down.
	(define_label): Same.
	(finish_decl): Same.
	(build_compound_literal): Same.
	(finish_struct): Same.
	(finish_function): Do not set location here.
	(check_for_loop_decls): New argument.
	* tree.c (save_expr): Set location.
	(build_empty_stmt): New argument.
	* tree.h (build_empty_stmt): New argument to build_empty_stmt.
	(CAN_HAVE_LOCATION_P): Make sure we have a non empty node.
	* builtins.c (gimplify_va_arg_expr): Use locations.
	(expand_builtin_sync_operation): Same.
	* c-typeck.c (build_component_ref): New argument.
	(build_array_ref): Same.
	(build_external_ref): Same.
	(c_expr_sizeof_expr): Same.
	(c_expr_sizeof_type): Same.
	(parser_build_unary_op): Same.
	(build_conditional_expr): Same.
	(build_compound_expr): Pass location on down.
	(build_compound_expr): New argument.
	(build_c_cast): Same.
	(c_cast_expr): Same.
	(build_asm_expr): Same.
	(c_finish_return): Same.
	(c_process_expr_stmt): Pass location on down.
	(c_finish_stmt_expr): New argument.
	(push_clenaup): Same.
	(c_finish_omp_parallel): Same.
	(c_finish_omp_task): Same.
	* gimplify.c (gimplify_call_expr): Pass location on down.
	* c-omp.c (c_finish_omp_master): New argument.
	(c_finish_omp_critical): Same.
	(c_finish_omp_ordered): Same.
	(c_finish_omp_barrier): Same.
	(-c_finish_omp_taskwait): Same.
	(c_finish_omp_atomic): Same.
	(c_finish_omp_flush): Same.
	* tree-inline.c (copy_tree_body_r): Pass location on down.
	(inline_forbidden_p): Remove use of input_location.
	* c-gimplify.c (c_build_bind_expr): New argument.
	* c-common.c (c_common_truthvalue_conversion): Pass location on down.
	(c_sizeof_or_alignof_type): New argument.
	(c_alignof_expr): Same.
	(build_va_arg): Same.
	(c_add_case_label): Same.
	* c-common.h (c_sizeof_or_alignof_type, c_alignof_expr,
	c_sizeof, c_alignof, build_va_arg, build_stmt, build_case_label,
	c_build_bind_expr, objc_build_selector_expr, objc_build_throw_stmt,
	c_finish_omp_master, c_finish_omp_critical, c_finish_omp_ordered,
	c_finish_omp_barrier, c_finish_omp_atomic, c_finish_omp_flush,
	c_finish_omp_taskwait, c_finish_omp_for, c_split_parallel_clauses):
	New argument.
	* stub-objc.c (objc_build_selector_expr): Same.
	(objc_build_throw_stmt): Same.
	* c-parser.c (c_parser_declaration_or_fndef): Pass location on down.
	(c_parser_initelt): Same.
	(c_parser_compound_statement): Same.
	(c_parser_compound_statement_nostart): Same.
	(c_parser_label): Same.
	(c_parser_statement_after_labels): Same.
	(c_parser_if_body): Same.
	(c_parser_else_body): Same.
	(c_parser_if_statement): Same.
	(c_parser_switch_statement): Same.
	(c_parser_while_statement): Same.
	(c_parser_do_statement): Same.
	(c_parser_for_statement): Same.
	(c_parser_asm_statement): Same.
	(c_parser_conditional_expression): Same.
	(c_parser_binary_expression): Same.
	(c_parser_cast_expression): Same.
	(c_parser_unary_expression): Same.
	(c_parser_sizeof_expression): Same.
	(c_parser_alignof_expression): Same.
	(c_parser_postfix_expression): Same.
	(c_parser_expression): Same.
	(c_parser_objc_receiver): Same.
	(c_parser_omp_variable_list): Same.
	(c_parser_omp_structured_block): Same.
	(c_parser_omp_atomic): New argument.
	(c_parser_omp_barrier): Same.
	(c_parser_omp_critical): Same.
	(c_parser_omp_flush): Pass location on down.
	(c_parser_omp_for_loop): New argument.
	(c_parser_omp_for): Same.
	(c_parser_omp_master): Same.
	(c_parser_omp_ordered): Same.
	(c_parser_omp_sections_scope): Same.
	(c_parser_omp_sections): Same.
	(c_parser_omp_parallel): Same.
	(c_parser_omp_single): Same.
	(c_parser_omp_task): Same.
	(c_parser_omp_taskwait): Pass location on down.
	(c_parser_omp_construct): Same.
	(c_parser_omp_threadprivate): Same.
	* dwarf2asm.c, targhooks.c, optabs.c, tree.c, tree.h, target.h,
	builtins.c, omp-low.c, cgraphunit.c, tree-call-cdce.c,
	tree-ssa-alias.c, gimple-low.c, c-tree.h, expr.c, tree-parloops.c,
	c-decl.c, tree-eh.c, langhooks.c, function.c, stor-layout.c,
	c-typeck.c, gimplify.c, c-pragma.c, expmed.c, except.c, coverage.c,
	emit-rtl.c, cfgexpand.c, tree-mudflap.c, varasm.c, tree-nested.c,
	rtl.h, tree-inline.c, tree-profile.c, c-common.c, c-common.h,
	tree-switch-conversion.c, tree-cfg.c, ipa-struct-reorg.c, c-parser.c,
	config/i386/i386.c, stmt.c:
	Add location argument to the following function definitions and/or
	function calls: build_decl, objcp_start_struct, objcp_finish_struct,
	start_struct, finish_struct, PUSH_FIELD, create_artificial_label,
	cp_make_fname_decl, pushtag, implicitly_declare, c_make_fname_decl,
	build_compound_literal, parser_xref_tag, resolve_overloaded_builtin,
	do_case, c_finish_bc_stmt, build_compound_literal,
	build_function_call.
	* c-decl.c (build_compound_literal): Add location argument.
	Make all diagnostic calls use location.
	(start_struct): Same.
	(finish_struct): Same.
	(start_enum): Same.
	(build_enumerator): Same.
	(start_function): Same.
	(grokdeclarator): Make all diagnostic calls use location.
	(store_parm_decls_oldstyle): Same.
	* c-typeck.c (build_function_call): Add location argument.
	Make all diagnostic calls use location.
	(do_case): Same.
	(c_finish_bc_stmt): Same.
	* tree-nested.c (get_trampoline_type): Add argument.
	Pass location to build_decl.
	(lookup_tramp_for_decl): Pass location to get_trampoline_type.
	* rtl.h (RTL_LOCATION): New.
	* c-common.c (c_add_case_label): Add location argument.
	Make all diagnostic calls use location.
	* c-common.h: Add location argument to make_fname_decl, do_case,
	c_add_case_label, build_function_call, resolve_overloaded_builtin.
	* c-parser.c (c_parser_enum_specifier): Rename ident_loc to enum_loc.
	Set it appropriately for every case.  Pass enum_loc to start_enum
	call.  Pass value_loc first to build_enumerator.  Pass enum_loc to
	parser_xref_tag.
	(c_parser_struct_or_union_specifier): Save location.  Use it for
	start_struct, finish_struct, and parser_xref_tag.
gcc/testsuite/
	* gcc.dg/old-style-prom-3.c: Add column info.
	* gcc.dg/overflow-warn-1.c
	* gcc.dg/gomp/pr27415.c
	* gcc.dg/gomp/for-1.c: Same.
	* gcc.dg/enum-compat-1.c: Same.
	* gcc.dg/c99-tag-3.c: Same.
	* gcc.dg/Wredundant-decls-2.c: Same.
	* gcc.dg/func-ptr-conv-1.c: Same.
	* gcc.dg/asm-wide-1.c: Same.
	* gcc.dg/nofixed-point-2.c: Same.
	* gcc.dg/cpp/line3.c: Same.
	* gcc.dg/array-10.c: Same.
	* gcc.dg/c99-vla-jump-1.c: Same.
	* gcc.dg/pr20368-1.c: Same.
	* gcc.dg/Wshadow-3.c: Same.
	* gcc.dg/c90-const-expr-8.c: Same.
	* gcc.dg/label-decl-2.c: Same.
	* gcc.dg/dremf-type-compat-2.c: Same.
	* gcc.dg/c90-const-expr-5.c: Same.
	* gcc.dg/builtins-30.c: Same.
	* gcc.dg/Warray-bounds.c: Same.
	* gcc.dg/Wcxx-compat-2.c: Same.
	* gcc.dg/tree-ssa/col-1.c: Same.
	* gcc.dg/old-style-prom-2.c: Same.
	* gcc.dg/cast-function-1.c: Same.
	* gcc.dg/pr15698-1.c: Same.
	* gcc.dg/dremf-type-compat-3.c: Same.
	* gcc.dg/vla-8.c: Same.
	* gcc.dg/gomp/pr27415.c: Move firstprivate diagnostics to correct
	line.
	* gcc.dg/label-decl-2.c: Move label diagnostic to correct line.
	* gcc.dg/old-style-prom-3.c: Check for error on the correct line.
	* gcc.dg/enum-compat-1.c: Same.
	* gcc.dg/dremf-type-compat-2.c: Same.
	* gcc.dg/old-style-prom-2.c: Same.
	* gcc.dg/pr15698-1.c: Same.
	* gcc.dg/pr20368-1.c: Same.
	* gcc.dg/dremf-type-compat-3.c: Same.
	* gcc.dg/builtins-30.c: Same.  Test for columns.
gcc/objcp/
	* objcp-decl.h (c_end_compound_stmt): New argument.
	* objcp-decl.c (objcp_start_struct): Add argument.
	(objcp_finish_struct): Same.
gcc/cp/
	* typeck.c (cp_build_binary_op): Pass location to overflow_warning.
	(build_modify_expr): New arg.
	* semantics.c (finish_unary_op_expr): Pass location to
	overflow_warning.
	(handle_omp_for_class_iterator): Pass location to build_modify_expr.
	* typeck.c (cxx_sizeof_or_alignof_type): Pass location to
	c_sizeof_or_alignof_type.
	(build_array_ref): New argument.
	(build_compound_expr): Same.
	(build_const_cast): Same.
	(build_ptrmemfunc): Pass location to build_c_cast.
	* init.c (avoid_placement_new_aliasing): Pass location to
	build_stmt.
	(build_vec_delete_1): Pass location to cp_build_modify_expr,
	build_compound_expr.
	* class.c (build_vtbl_ref_1): Pass location to build_array_ref.
	* decl.c (poplevel): Pass location to c_build_bind_expr.
	(finish_case_label): Pass location to build_case_label.
	(finish_constructor_body): Same.
	(finish_destructor_body): Pass location to build_stmt.
	(cxx_maybe_build_cleanup): Same, but to build_compound_expr.
	* call.c (build_new_op): Pass location to build_array_ref.
	(build_x_va_arg): Pass location to build_va_arg.
	* except.c (expand_end_catch_block): Pass location to
	build_stmt.
	* cp-tree.h (build_array_ref): New argument.
	(build_compound_expr): Same.
	(build_c_cast): Same.
	* cp-gimplify.c (gimplify_if_stmt): Pass location on down.
	(gimplify_switch_stmt): Same.
	* typeck2.c (split_nonconstant_init_1): Same.
	* pt.c (tsubst_copy): Same.
	* semantics.c (add_decl_expr): Same.
	(do_poplevel): Same.
	(push_cleanup): Same.
	(finish_goto_stmt): Same.
	(finish_expr_stmt): Same.
	(begin_if_stmt): Same.
	(begin_while_stmt): Same.
	(begin_do_stmt): Same.
	(finish_return_stmt): Same.
	(begin_for_stmt): Same.
	(finish_break_stmt): Same.
	(finish_continue_stmt): Same.
	(begin_switch_stmt): Same.
	(begin_try_block): Same.
	(begin_handler): Same.
	(finish_asm_stmt): Same.
	(finish_label_stmt): Same.
	(finish_stmt_expr_expr): Same.
	(finalize_nrv_r): Same.
	(finish_omp_atomic): Same.
	* name-lookup.c (do_using_directive): Same.
	* decl2.c (grok_array_decl): Same.
	* parser.c (cp_parser_cast_expression): Same.
	(cp_parser_selection_statement): Same.
	(cp_parser_implicitly_scoped_statement): Same.
	(cp_parser_objc_selector_expression): Same.
	(cp_parser_objc_synchronized_statement): Same.
	(cp_parser_objc_throw_statement): Same.
	(cp_parser_omp_critical): Same.
	(cp_parser_omp_master): Same.
	* typeck.c (build_function_call): Add location argument.
	* init.c: Add location argument to all build_decl calls.
	* class.c: Same.
	* method.c: Same.
	* rtti.c: Same.
	* tree.c: Same.
	* pt.c: Same.
	* semantics.c: Same.
	* lex.c: Same.
	* decl2.c: Same.
	* cp-gimplify.c: Same.
	* decl.c: Same.
	(cp_make_fname_decl): Add location argument.  Pass location ot
	build_decl.
	(finish_case_label): Same.
	* cp-tree.h (finish_case_label): Add location argument.
	* parser.c (cp_parser_label_for_labeled_statement): Pass location to
	finish_case_label.
gcc/fortran/
	* trans-array.c (gfc_trans_allocate_array_storage): Pass
	location on down.
	(gfc_trans_array_constructor_value): Same.
	(gfc_trans_scalarized_loop_end): Same.
	(gfc_conv_ss_startstride): Same.
	(gfc_trans_g77_array): Same.
	(gfc_trans_dummy_array_bias): Same.
	(gfc_conv_array_parameter): Same.
	(structure_alloc_comps): Same.
	* trans-expr.c (gfc_conv_function_call): Same.
	(fill_with_spaces): Same.
	(gfc_trans_string_copy): Same.
	(gfc_trans_scalar_assign): Same.
	* trans-stmt.c (gfc_trans_goto): Same.
	(gfc_trans_if_1): Same.
	(gfc_trans_simple_do): Same.
	(gfc_trans_do): Same.
	(gfc_trans_do_while): Same.
	(gfc_trans_logical_select): Same.
	(gfc_trans_select): Same.
	(gfc_trans_forall_loop): Same.
	(gfc_trans_nested_forall_loop): Same.
	(generate_loop_for_temp_to_lhs): Same.
	(generate_loop_for_rhs_to_temp): Same.
	(gfc_trans_forall_1): Same.
	(gfc_trans_where_assign): Same.
	(gfc_trans_where_3): Same.
	(gfc_trans_allocate): Same.
	* trans.c (gfc_finish_block): Same.
	(gfc_trans_runtime_check): Same.
	(gfc_call_malloc): Same.
	(gfc_allocate_with_status): Same.
	(gfc_call_free): Same.
	(gfc_deallocate_with_status): Same.
	(gfc_call_realloc): Same.
	(gfc_trans_code): Same.
	* trans-decl.c (gfc_init_default_dt): Same.
	(gfc_generate_constructors): Same.
	* trans-io.c (gfc_trans_io_runtime_check): Same.
	* trans-intrinsic.c (gfc_conv_intrinsic_ctime): Same.
	(gfc_conv_intrinsic_fdate): Same.
	(gfc_conv_intrinsic_ttynam): Same.
	(gfc_conv_intrinsic_minmax): Same.
	(gfc_conv_intrinsic_minmax_char): Same.
	(gfc_conv_intrinsic_anyall): Same.
	(gfc_conv_intrinsic_count): Same.
	(gfc_conv_intrinsic_arith): Same.
	(gfc_conv_intrinsic_minmaxloc): Same.
	(gfc_conv_intrinsic_minmaxval): Same.
	(gfc_conv_intrinsic_rrspacing): Same.
	(gfc_conv_intrinsic_array_transfer): Same.
	(gfc_conv_intrinsic_trim): Same.
	(gfc_conv_intrinsic_repeat): Same.

From-SVN: r148442
2009-06-12 22:06:47 +00:00
Ian Lance Taylor 744aa42fab targhooks.c (default_builtin_vectorized_function): Change fn parameter to unsigned int.
./:	* targhooks.c (default_builtin_vectorized_function): Change fn
	parameter to unsigned int.
	(default_builtin_vectorized_conversion): Change code parameter to
	unsigned int.
	(default_builtin_reciprocal): Change fn parameter to unsigned int.
	* targhooks.h: Update declarations.
	* config/rs6000/rs6000.c (rs6000_builtin_conversion): Change code
	parameter to unsigned int.

	* c-typeck.c (comptypes_check_enum_int): New static function.
	(comptypes_internal): Add enum_and_int_p parameter.  Change all
	callers.
	(comp_target_types): Add location parameter.  Change all callers.
	(tagged_types_tu_compatible_p): Add enum_and_int_p parameter.
	Change all callers.
	(function_types_compatible_p, type_lists_compatible_p): Likewise.
	(build_conditional_expr): Add colon_loc parameter.  Change all
	callers.
	(convert_for_assignment): Add location parameter.  Change all
	callers.
	* c-parser.c (c_parser_conditional_expression): Pass location of
	colon to build_conditional_expr.
	* c-tree.h (build_conditional_expr): Update declaration.
objc/:
	* objc-act.c (objc_gimplify_expr): Change return type to int.
	* objc-act.h: Update declaration.
testsuite/:
	* gcc.dg/Wcxx-compat-12.c: New testcase.

From-SVN: r148325
2009-06-09 20:34:13 +00:00
Alexandre Oliva 2153915d0a common.opt (fcompare-debug=, [...]): New.
gcc/ChangeLog:
* common.opt (fcompare-debug=, fcompare-debug-second): New.
(fdump-final-insns=, gtoggle): New.
* doc/invoke.texi: Document them.
* final.c (rest_of_clean_state): Dump final insn stream.
* gcc.c (invoke_as): Hook in -fcompare-debug.
(static_spec_functions): Add compare-debug-dump-opt,
compare-debug-self-opt and compare-debug-auxbase-opt.
(compare_debug, compare_debug_second, compare_debug_opt): New.
(switches_debug_check, n_switches_debug_check): New.
(debug_auxbase_opt, debug_check_temp_file): New.
(process_command): Handle -fno-compare-debug, -fcompare-debug and
-fcompare-debug=*.
(do_self_spec): Handle arguments after switches.
(do_spec_1): Add .gk extension to temp file basenames for compare.
(check_live_switch): Take SWITCH_IGNORE into account, and earlier.
(cc1_options): Use it instead of normal auxbase computation for
the second compare-debug compilation.
(compare_files): New.
(main): Set up and implement compare debug mode.
(compare_debug_dump_opt_spec_function): New.
(compare_debug_self_opt_spec_function): New.
(compare_debug_auxbase_opt_spec_function): New.
* toplev.c (process_options): Handle flag_gtoggle,
flag_dump_final_insns.
* coverage.c (coverage_begin_output): Don't overwrite .gcno file
during -fcompare-debug-second compilation.
gcc/cp/ChangeLog:
* repo.c (get_base_filename): Use aux_base_name rather than
alternate temporary file during second compare debug compilation.
(finish_repo): Skip during -fcompare-debug-second.
gcc/ada/ChangeLog:
* lib-writ.adb (flag_compare_debug): Import.
(Write_ALI): Skip during -fcompare-debug-second.
gcc/fortran/ChangeLog:
* options.c (gfc_post_options): Disable dump_parse_tree
during -fcompare-debug-second.
gcc/objc/ChangeLog:
* objc-act.c (objc_init): Skip print_struct_values during
-fcompare-debug-second.

From-SVN: r148271
2009-06-08 07:46:02 +00:00
Ian Lance Taylor 6bc7bc1477 ansidecl.h (EXPORTED_CONST): Define.
include/:
	* ansidecl.h (EXPORTED_CONST): Define.
gcc/:
	* dummy-checksum.c (executable_checksum): Use EXPORTED_CONST.
	* genattrtab.c (write_length_unit_log): Likewise.
	* genchecksum.c (dosum): Likewise.
	* gengtype.c (write_rtx_next): Likewise.
	(finish_root_table, write_roots): Likewise.
	* gimple.c (gimple_ops_offset_): Likewise.
	* tree-nomudflap.c (gt_ggc_r_gt_tree_mudflap_h): Likewise.
	* config/arc/arc.c (arc_attribute_table): Likewise.
	* config/arm/arm.c (arm_attribute_table): Likewise.
	* config/avr/avr.c (avr_attribute_table): Likewise.
	* config/crx/crx.c (crx_attribute_table): Likewise.
	* config/m32r/m32r.c (m32r_attribute_table): Likewise.
	* config/m68hc11/m68hc11.c (m68hc11_attribute_table): Likewise.
	* config/mcore/mcore.c (mcore_attribute_table): Likewise.
	* config/rs6000/rs6000.c (rs6000_attribute_table): Likewise.
	* config/sh/sh.c (sh_attribute_table): Likewise.
	* config/sparc/sparc.c (sparc_attribute_table): Likewise.
	* config/spu/spu.c (spu_attribute_table): Likewise.
	* config/v850/v850.c (v850_attribute_table): Likewise.

	* config/alpha/alpha.c (vms_attribute_table): Make static.
	* config/bfin/bfin.c (bfin_attribute_table): Likewise.
	* config/h8300/h8300.c (h8300_attribute_table): Likewise.
	* config/mips/mips.c (mips_attribute_table): Likewise.

	* Makefile.in (dummy-checksum.o): Depend upon $(CONFIG_H) and
	$(SYSTEM_H).
	(cc1-checksum.o): Likewise.
gcc/cp/:
	* Make-lang.in (cc1plus-checksum.o): Depend upon $(CONFIG_H) and
	$(SYSTEM_H).
gcc/objc/:
	* Make-lang.in (cc1obj-checksum.o): Depend upon $(CONFIG_H) and
	$(SYSTEM_H).
gcc/objcp/:
	* Make-lang.in (cc1objplus-checksum.o): Depend upon $(CONFIG_H)
	and $(SYSTEM_H).

From-SVN: r148146
2009-06-03 20:19:55 +00:00
Ian Lance Taylor c607156f99 Makefile.in (LINKER, [...]): Define.
./:	* Makefile.in (LINKER, LINKER_FLAGS): Define.
	(LINKER_FOR_BUILD, BUILD_LINKERFLAGS): Define.
	(ALL_LINKERFLAGS): Define.
	(xgcc$(exeext)): Change $(COMPILER) to $(LINKER).
	(cpp$(exeext), cc1-dummy$(exeext), cc1$(exeext)): Likewise.
	(collect2$(exeext), mips-tfile, mips-tdump): Likewise.
	(gcov$(exeext), gcov-dump$(exeext)): Likewise.
	(build/gen%$(build_exeext)): Change $(COMPILER_FOR_BUILD) to
	$(LINKER_FOR_BUILD).
	(build/gcov-iov$(build_exeext)): Likewise.
cp/:
	* Make-lang.in (g++$(exeext)): Change $(COMPILER) to $(LINKER).
	(cc1plus-dummy$(exeext), cc1plus$(exeext)): Likewise.
fortran/:
	* Make-lang.in (gfortran$(exeext)): Change $(COMPILER) to
	$(LINKER).
	(f951$(exeext)): Likewise.
java/:
	* Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
	$(LINKER).
	(jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
objc/:
	* Make-lang.in (cc1obj-dummy$(exeext)): Change $(COMPILER) to
	$(LINKER).
	(cc1obj$(exeext)): Likewise.
objcp/:
	* Make-lang.in (cc1objplus-dummy$(exeext)): Change $(COMPILER) to
	$(LINKER).
	(cc1objplus$(exeext)): Likewise.

From-SVN: r147927
2009-05-27 19:51:15 +00:00
Ian Lance Taylor 7980bfb829 Makefile.in (COMPILER, [...]): Define.
./:	* Makefile.in (COMPILER, COMPILER_FLAGS): Define.
	(COMPILER_FOR_BUILD, BUILD_COMPILERFLAGS): Define.
	(ALL_COMPILERFLAGS): Define.
	(.c.o, xgcc$(exeext), cpp$(exeext)): Use $(COMPILER).
	(cc1-dummy$(exeext), cc1$(exeext)): Likewise.
	(collect2$(exeext), collect2.o): Likewise.
	(c-opts.o, c-cppbuiltin.o, c-pch.o, gcc.o, gccspec.o): Likewise.
	(gcc-options.o, version.o, prefix.o, toplev.o): Likewise.
	($(out_object_file), mips-tfile, mips-tdump): Likewise.
	(libbackend.o, intl.o, cppdefault.o): Likewise.
	(gcov$(exeext), gcov-dump$(exeext)): Likewise.
	(build/%.o): Use $(COMPILER_FOR_BUILD).
	(build/gen%$(build_exeext)): Likewise.
	(build/gcov-iov$(build_exeext)): LIkewise.
	* config/t-darwin (darwin.o): Use $(COMPILER).
	(darwin-c.o, darwin-f.o, darwin-driver.o): Likewise.
	* config/t-sol2 (sol2-c.o): Likewise.
	(sol2.o): Likewise.
	* config/t-vxworks (vxworks.o): Likewise.
	* config/x-darwin (host-darwin.o): Likewise.
	* config/x-hpux (host-hpux.o): Likewise.
	* config/x-linux (host-linux.o): Likewise.
	* config/x-solaris (host-solaris.o): Likewise.
	* config/alpha/x-alpha (driver-alpha.o): Likewise.
	* config/arm/t-arm (arm-c.o): Likewise.
	* config/arm/t-pe (pe.o): Likewise.
	* config/arm/t-wince-pe (pe.o): Likewise.
	* config/i386/t-cygming (winnt.o): Likewise.
	(winnt-cxx.o, winnt-stubs.o, msformat-c.o): Likewise.
	* config/i386/t-cygwin (cygwin1.o): Likewise.
	(cygwin2.o): Likewise.
	* config/i386/t-i386 (i386-c.o): Likewise.
	* config/i386/t-interix (winnt.o): Likewise.
	* config/i386/t-netware (netware.o): Likewise.
	* config/i386/t-nwld (nwld.o): Likewise.
	* config/i386/x-darwin (host-i386-darwin.o): Likewise.
	* config/i386/x-i386 (driver-i386.o): Likewise.
	* config/i386/x-cygwin (host-cygwin.o): Likewise.
	* config/i386/x-mingw32 (host-mingw32.o): Likewise.
	* config/ia64/t-ia64 (ia64-c.o): Likewise.
	* config/m32c/t-m32c (m32c-pragma.o): Likewise.
	* config/mips/x-native (driver-native.o): Likewise.
	* config/rs6000/t-rs6000 (rs6000-c.o): Likewise.
	* config/rs6000/x-darwin (host-ppc-darwin.o): Likewise.
	* config/rs6000/x-darwin64 (host-ppc64-darwin.o): Likewise.
	* config/rs6000/x-rs6000 (driver-rs6000.o): Likewise.
	* config/score/t-score-elf (score7.o): Likewise.
	(score3.o): Likewise.
	* config/sh/t-sh (sh-c.o): Likewise.
	* config/sh/t-symbian (sh-c.o): Likewise.
	(symbian.o): Likewise.
	* config/spu/t-spu-elf (spu-c.o): Likewise.
	* config/v850/t-v850 (v850-c.o): Likewise.
	* config/v850/t-v850e (v850-c.o): Likewise.
ada/:
	* gcc-interface/Makefile.in (COMPILER): Define.
	(COMPILER_FLAGS, ALL_COMPILERFLAGS): Define.
	(.c.o, cio.o, init.o, initialize.o, targext.o): Use $(COMPILER).
	(seh_init.o, tracebak.o): Likewise.
	* gcc-interface/Make-lang.in (ada/targext.o): Likewise.
	(ada/cio.o, ada/init.o, ada/initialize.o, ada/raise.o): Likewise.
	(ada/tracebak.o, ada/cuintp.o, ada/decl.o, ada/misc.o): Likewise.
	(ada/targtyps.o, ada/trans.o, ada/utils.o): Likewise.
	(ada/utils2.o): Likewise.
cp/:
	* Make-lang.in (g++spec.o): Use $(COMPILER).
	(g++$(exeext), cc1plus-dummy$(exeext)): Likewise.
	(cc1plus$(exeext)): Likewise.
fortran/:
	* Make-lang.in (gfortranspec.o): Use $(COMPILER).
	(gfortran$(exeext), f951$(exeext), fortran/cpp.o): Likewise.
java/:
	* Make-lang.in (jvspec.o): Use $(COMPILER).
	($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
	(jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
objc/:
	* Make-lang.in (cc1obj-dummy$(exeext)): Use $(COMPILER).
	(cc1obj$(exeext)): Likewise.
objcp/:
	* Make-lang.in (cc1objplus-dummy$(exeext)): Use $(COMPILER).
	(cc1objplus$(exeext), objcp/objcp-act.o): Likwise.

From-SVN: r147873
2009-05-26 14:02:04 +00:00
Ian Lance Taylor c166b8981f tree.c (build_tree_list_vec_stat): New function.
./:	* tree.c (build_tree_list_vec_stat): New function.
	(ctor_to_vec): New function.
	(build_nt_call_vec): New function.
	(build_call_array): Change args to be a const pointer.
	(build_call_vec): New function.
	* tree.h (build_nt_call_vec): Declare.
	(build_tree_list_vec_stat): Declare.
	(build_tree_list_vec): Define.
	(build_call_array): Update declaration.
	(build_call_vec): Declare.
	(ctor_to_vec): Declare.
	* c-common.c (tree_vector_cache): New static variable.
	(make_tree_vector): New function.
	(release_tree_vector): New function.
	(make_tree_vector_single): New function.
	(make_tree_vector_copy): New function.
	* c-common.h (tree_vector_cache, make_tree_vector): Declare.
	(make_tree_vector_single, make_tree_vector_copy): Declare.
	* c-parser.c (cached_expr_list_1, cached_expr_list_2): Remove.
	(c_parser_expr_list): Don't manage cache here, instead call
	make_tree_vector.
	(c_parser_release_expr_list): Remove static function.
	(c_parser_vec_to_tree_list): Remove static function.
	(c_parser_attributes): Call build_tree_list_vec instead of
	c_parser_vec_to_tree_list.  Call release_tree_vector instead of
	c_parser_release_expr_list.
	(c_parser_postfix_expression_after_primary): Likewise.
	(c_parser_objc_keywordexpr): Likewise.
cp/:
	* parser.c (cp_parser_postfix_expression): Change args to a vec.
	Release it when done.
	(tree_vector): Define typedef.  Define VEC functions.
	(cp_parser_parenthesized_expression_list): Change return type to
	vec.  Change all callers.
	(cp_parser_new_expression): Change placement and initializer to
	vecs.  Release them when done.
	(cp_parser_new_placement): Change return type to vec.  Change all
	callers.
	(cp_parser_new_initializer): Likewise.
	* typeck.c (build_function_call_vec): Just call
	cp_build_function_call_vec.
	(cp_build_function_call): Just build a vec and call
	cp_build_function_call_vec.
	(cp_build_function_call_vec): New function based on old
	cp_build_function_call.
	(convert_arguments): Remove nargs and argarray parameters.  Change
	values to a vec.  Change caller.
	(build_x_compound_expr_from_vec): New function.
	(cp_build_modify_expr): Build vec to pass to
	build_special_member_call.
	* call.c (struct z_candidate): Add first_arg field.  Change args
	field to vec.
	(convert_class_to_reference): Handle first argument separately.
	(add_candidate): Add first_arg parameter.  Change args parameter
	to vec.  Change all callers.
	(add_function_candidate, add_conv_candidate): Likewise.
	(add_template_candidate_real, add_template_candidate): Likewise.
	(add_template_conv_candidate): Likewise.
	(build_user_type_conversion_1): Handle first argument separately.
	(resolve_args): Change return type and parameter type to vecs.
	Change all callers.
	(perform_overload_resolution): Change args parameter to vec.
	Change all callers.
	(build_new_function_call, build_operator_new_call): Likewise.
	(add_candidates): Likewise.
	(build_op_call): New globally visible function, built from and
	replacing static function build_object_call.
	(build_new_op): Don't handle CALL_EXPR.  Build vec, not tree_list,
	of arguments.
	(build_op_delete_call): Build vec to pass to
	cp_build_function_call_vec.
	(build_temp): Build vec to pass to build_special_member_call.
	(convert_like_real): Likewise.
	(perform_direct_initialization_if_possible): Likewise.
	(build_over_call): Handle first_arg field.  Use build_call_array
	rather than build_call_list.
	(build_special_member_call): Change args parameter to vec.  Change
	all callers.
	(build_new_method_call): Likewise.
	* init.c (expand_default_init): Change parms to vec.
	(build_raw_new_expr): Change placement and init to vecs.  Change
	all callers.
	(build_new_1, build_new): Likewise.
	* class.c (resolve_address_of_overloaded_function): Build array to
	pass to fn_type_unification.
	* pt.c (tsubst_copy_and_build): For NEW_EXPR build vecs to pass to
	build_new.  For CALL_EXPR create a vec rather than a tree_list;
	expand a pack if necessary.
	(fn_type_unification): Change args parameter to const tree *.  Add
	nargs parameter.  Change all callers.
	(type_unification_real): Likewise.
	(unify): Build array to pass to type_unification_real.
	(get_bindings): Build array to pass to fn_type_unification.
	(any_type_dependent_arguments_p): Change args parameter to a vec.
	Change all callers.
	(make_args_non_dependent): Renamed from build_non_dependent_args.
	Change return type to void.  Change parameter type to vec.  Change
	all callers.
	(do_auto_deduction): Pass an array to type_unification_real.
	* semantics.c (perform_koenig_lookup): Change args to vec.  Change
	all callers.
	(finish_call_expr): Change args to vec.  Change all callers.  Call
	build_op_call instead of passing CALL_EXPR to build_new_op.
	(cxx_omp_create_clause_info): Allocate vec to pass to
	build_special_member_call.
	* decl2.c (build_offset_ref_call_from_tree): Change args parameter
	to vec.  Change all callers.
	* name-lookup.c (lookup_function_nonclass): Likewise.
	(struct arg_lookup): Change args to vec.
	(arg_assoc_namespace): Handle args as a vec.
	(arg_assoc_args_vec): New static function.
	(lookup_arg_dependent): Change args parameter to vec.  Change all
	callers.
	* method.c (do_build_assign_ref): Allocate vec to pass to
	build_special_member_call.
	* except.c (build_throw): Likewise.
	* typeck2.c (build_functional_cast): Likewise.
	* cvt.c (ocp_convert): Likewise.
	* tree.c (build_min_non_dep_call_vec): Change last parameter to
	vec.  Change all callers.
	* cp-tree.h: Update declarations.
	* name-lookup.h: Update declarations.
objc/:
	* objc-act.c (objc_generate_cxx_ctor_or_dtor): Pass NULL rather
	than NULL_TREE to build_special_member_call.

From-SVN: r147759
2009-05-21 05:58:39 +00:00
Ian Lance Taylor 24b97832e7 basic-block.h (enum profile_status): Break out of struct control_flow_graph.
./:	* basic-block.h (enum profile_status): Break out of struct
	control_flow_graph.
	* cgraph.h (struct inline_summary): Break out of struct
	cgraph_local_info.
	* cgraphunit.c (enum cgraph_order_sort_kind): New enum, broken out
	of struct cgraph_order_sort.
	* combine.c (enum undo_kind): New enum, broken out of struct
	undo.
	* cse.c (struct branch_path): Break out of struct
	cse_basic_block_data.
	* except.h (enum eh_region_type): Break out of struct eh_region.
	* gcc.c (enum add_del): Break out of struct modify_target.
	* genrecog.c (enum decision_type): Break out of struct
	decision_test.
	* ggc-page.c (struct ggc_pch_ondisk): Break out of struct
	ggc_pch_data.
	* matrix-reorg.c (struct free_info): Break out of struct
	matrix_info.
	* regmove.c (enum match_use): New enum, broken out of struct
	match.
	* sched-int.h (enum post_call_group): New enum, broken out of
	struct deps.
	(struct deps_reg): Break out of struct deps.
	* target.h (struct asm_int_op): Break out of struct gcc_target.
	* tree-eh.c (struct goto_queue_node): Break out of struct
	leh_tf_state.
	* tree-inline.h (enum copy_body_cge_which): Break out of
	copy_body_data.
	* tree-pass.h (enum opt_pass_type): Break out of struct opt_pass.

	* c-decl.c (in_struct, struct_types): New static variables.
	(pushtag): Add loc parameter.  Change all callers.
	(lookup_tag): Add ploc parameter.  Change all callers.
	(check_compound_literal_type): New function.
	(parser_xref_tag): Add loc parameter.  Change all callers.  If
	-Wc++-compat, warn about struct/union/enum types defined within a
	struct or union.
	(start_struct): Add enclosing_in_struct, enclosing_struct_types,
	and loc parameters.  Change all callers.  Change error calls to
	error_at, using loc.  For a redefinition, if the location of the
	original definition is known, report it.  Set in_struct and
	struct_types.  If -Wc++-compat warn if in sizeof, typeof, or
	alignof.
	(finish_struct): Add new parameters enclosing_in_struct and
	enclosing_struct_types.  Change all callers.  Set
	C_TYPE_DEFINED_IN_STRUCT for all struct/union/enum types defined
	in the struct.  If in a struct, add this struct to struct_types.
	(start_enum): Add loc parameter.  Change all callers.  Use
	error_at for errors, using loc.  For a redefinition, if the
	location of the original definition is known, report it.  If in a
	struct, add this enum type to struct_types.  If -Wc++-compat warn
	if in sizeof, typeof, or alignof.
	* c-parser.c (disable_extension_diagnostics): Disable
	-Wc++-compat.
	(enable_extension_diagnostics): Reenable -Wc++-compat if
	appropriate.
	(c_parser_enum_specifier): Get enum location for start_enum.
	(c_parser_struct_or_union_specifier): Get struct location for
	start_struct.  Save in_struct and struct_types status between
	start_struct and finish_struct.
	(c_parser_cast_expression): Get location of cast.
	(c_parser_alignof_expression): Get location of type.
	(c_parser_postfix_expression): Likewise.
	(c_parser_postfix_expression_after_paren_type): Add type_loc
	parameter.  Change all callers.  Call
	check_compound_literal_type.  Use type_loc for error about
	variable size type.
	* c-typeck.c (build_external_ref): If -Wc++-compat, warn about a
	use of an enum constant from an enum type defined in a struct or
	union.
	(c_cast_expr): Add loc parameter.  Change all callers.  If
	-Wc++-compat, warn about defining a type in a cast.
	* c-tree.h (C_TYPE_DEFINED_IN_STRUCT): Define.
	(start_enum, start_struct, finish_struct): Update declarations.
	(parser_xref_tag, c_cast_expr): Update declarations.
	(check_compound_literal_type): Declare.
fortran/:
	* gfortran.h (enum gfc_omp_sched_kind): New enum, broken out of
	gfc_omp_clauses.
	(enum gfc_omp_default_sharing): Likewise.
	* module.c (enum gfc_rsym_state): New enum, broken out of
	pointer_info.
	(enum gfc_wsym_state): Likewise.
	* parse.c (enum state_order): New enum, broken out of st_state.
objc/:
	* objc-act.c (objc_building_struct): New static variable.
	(objc_in_struct, objc_struct_types): New static variables.
	(objc_start_struct, objc_finish_struct): New static functions.
	(generate_struct_by_value_array): Call objc_start_struct instead
	of start_struct, and call objc_finish_struct instead of
	finish_struct.
	(objc_build_struct, build_objc_symtab_template): Likewise.
	(build_module_descriptor): Likewise.
	(build_next_objc_exception_stuff): Likewise.
	(build_protocol_template): Likewise.
	(build_method_prototype_list_template): Likewise.
	(build_method_prototype_template): Likewise.
	(build_category_template, build_selector_template): Likewise.
	(build_class_template, build_super_template): Likewise.
	(build_ivar_template, build_ivar_list_template): Likewise.
	(build_method_list_template): Likewise.
	(build_method_template): Likewise.
objcp/:
	* objcp-decl.h (start_struct): Add three new, ignored, macro
	parameters.
	(finish_struct): Add two new, ignored, macro parameters.
testsuite/:
	* gcc.dg/Wcxx-compat-7.c: New testcase.
	* gcc.dg/Wcxx-compat-8.c: New testcase.
	* gcc.dg/c99-tag-1.c: Recognize new "originally defined here"
	notes
	* gcc.dg/pr17188-1.c: Likewise.
	* gcc.dg/pr39084.c: Likewise.

From-SVN: r147358
2009-05-11 01:02:40 +00:00
Joseph Myers f41c4af3d6 pretty-print.h (struct pretty_print_info): Add translate_identifiers.
* pretty-print.h (struct pretty_print_info): Add
	translate_identifiers.
	(pp_translate_identifiers): New.
	(pp_identifier): Only conditionally translate identifier to locale
	character set.
	* pretty-print.c (pp_construct): Set pp_translate_identifiers.
	(pp_base_tree_identifier): Only conditionally translate identifier
	to locale character set.
	* c-pretty-print.c (M_): Define.
	(pp_c_type_specifier, pp_c_primary_expression): Mark English
	fragments for conditional translation with M_.
	* tree-pretty-print.c (maybe_init_pretty_print): Disable
	identifier translation.

cp:
	* call.c (name_as_c_string): Call type_as_string_translate.
	Translate identifiers to locale character set.
	* cp-tree.h (lang_decl_name): Update prototype.
	(type_as_string_translate, decl_as_string_translate,
	cxx_printable_name_translate): Declare.
	* cxx-pretty-print.c (M_): Define.
	(pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
	English fragments for conditional translation with M_.
	* decl.c (grokdeclarator): Translate identifiers to locale
	character set for diagnostics.
	* error.c (M_): Define.
	(dump_template_bindings, dump_type, dump_aggr_type,
	dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
	dump_function_decl, dump_template_parms, dump_expr,
	dump_binary_op, op_to_string, assop_to_string): Mark English
	fragments for conditional translation with M_.
	(type_as_string): Disable translation of identifiers.
	(type_as_string_translate): New.
	(expr_as_string): Disable translation of identifiers.
	(decl_as_string): Disable translation of identifiers.
	(decl_as_string_translate): New.
	(lang_decl_name): Add parameter translate.
	(args_to_string): Call type_as_string_translate.
	(cp_print_error_function): Call cxx_printable_name_translate.
	(print_instantiation_full_context,
	print_instantiation_partial_context): Call
	decl_as_string_translate.
	* parser.c (cp_lexer_get_preprocessor_token): Use %qE for
	identifier in diagnostic.
	* tree.c (cxx_printable_name): Change to
	cxx_printable_name_internal.  Add parameter translate.
	(cxx_printable_name, cxx_printable_name_translate): New wrappers
	round cxx_printable_name_internal.

objc:
	* objc-act.c: Include intl.h.
	(objc_lookup_protocol): Use complete sentences for diagnostics
	with %qE for identifiers and translating results of
	gen_type_name_0 to locale character set.
	(objc_check_decl, check_protocol_recursively,
	lookup_and_install_protocols, objc_build_string_object,
	objc_get_class_reference, objc_declare_alias, objc_declare_class,
	objc_get_class_ivars, error_with_ivar, check_duplicates,
	objc_finish_message_expr, objc_build_protocol_expr,
	objc_build_selector_expr, build_ivar_reference, objc_add_method,
	add_category, add_instance_variable, objc_is_public,
	check_methods, check_methods_accessible, check_protocol,
	start_class, finish_class, start_protocol, really_start_method,
	get_super_receiver, objc_lookup_ivar): Use %E and %qE for
	identifiers in diagnostics.  Translate generated text to locale
	character set as needed.
	(check_protocol, check_protocols): Change name parameter to type
	tree.
	(lang_report_error_function): Remove.

From-SVN: r147333
2009-05-10 11:28:34 +01:00
Ian Lance Taylor 81f40b7964 collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind.
./:	* collect2.c (is_ctor_dtor): Change type of ret field in struct
	names to symkind.
	* dce.c (run_fast_df_dce): Change type of old_flags to int.
	* df-core.c (df_set_flags): Change return type to int.  Change
	type of old_flags to int.
	(df_clear_flags): Likewise.
	* df-scan.c (df_def_record_1): Change 0 to VOIDmode.
	(df_get_conditional_uses): Likewise.
	* df.h (df_set_flags, df_clear_flags): Update declarations.
	* dwarf2out.c (struct indirect_string_node): Change type of form
	field to enum dwarf_form.
	(AT_string_form): Change return type to enum dwarf_form.
	* fixed-value.c (fixed_compare): Add cast to enum type.
	* fwprop.c (update_df): Change 0 to VOIDmode.
	* gensupport.c: Change 0 to UNKNOWN.
	* gimple.h (gimple_cond_code): Add cast to enum type.
	* haifa-sched.c (reemit_notes): Add cast to enum type.
	* hooks.c (hook_int_void_no_regs): Remove function.
	* hooks.h (hook_int_void_no_regs): Remove declaration.
	* optabs.c (expand_widen_pattern_expr): Change 0 to VOIDmode.
	* predict.c (combine_predictions_for_insn): Add casts to enum
	type.
	* real.c (real_arithmetic): Add cast to enum type.
	(real_compare): Likewise.
	* target.h (struct gcc_target): Change return type of
	branch_target_register_class to enum reg_class.
	* target-def.h (TARGET_BRANCH_TARGET_REGISTER_CLASS): Define as
	default_branch_target_register_class.
	* targhooks.c (default_branch_target_register_class): New
	function.
	* targhooks.h (default_branch_target_register_class): Declare.
	* tree-data-ref.c (print_direction_vector): Add cast to enum
	type.
	* tree-vect-data-refs.c (vect_supportable_dr_alignment): Remove
	cast to int.
	* tree-vect-loop.c (vect_create_epilog_for_reduction): Change 0 to
	ERROR_MARK.
	* tree-vect-slp.c (vect_build_slp_tree): Change 0 to
	vect_uninitialized_def.  Change 0 to ERROR_MARK.
	* tree-vect-stmts.c (supportable_widening_operation): Don't
	initialize icode1 and icode2.
	* tree-vectorizer.h (enum vect_def_type): Add
	vect_uninitialized_def.
	* config/sol2-c.c (cmn_err_length_specs): Change 0 to FMT_LEN_none
	and to STD_C89.
	(cmn_err_flag_specs): Change 0 to STD_C89.
	(cmn_err_char_table): Likewise.
	* config/arm/arm.c (get_arm_condition_code): Change type of code
	to enum arm_cond_code.
	(IWMMXT_BUILTIN): Change 0 to UNKNOWN.
	(IWMMXT_BUILTIN2): Likewise.
	(neon_builtin_type_bits): Don't define typedef.
	(neon_builtin_datum): Change type of bits field to int.
	(arm_expand_neon_args): Add cast to enum type.
	* config/ia64/ia64.c (tls_symbolic_operand_type): Change 0 to
	TLS_MODEL_NONE.
	* config/i386/i386.c (bdesc_multi_arg): Change 0 to UNKNOWN.  Add
	casts to enum type.
	* config/mips/mips.c (LOONGSON_BUILTIN_ALIAS): Change 0 to
	MIPS_FP_COND_f.
	* config/mips/mips.md (jal_macro): Return enum constant.
	(single_insn): Likewise.
	* config/rs6000/rs6000.c (bdesc_altivec_preds): Change 0 to
	CODE_FOR_nothing.
	* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
	casts to enum type.
	* config/s390/s390.c (s390_tune_flags): Change type to int.
	(s390_arch_flags): Likewise.
	(s390_handle_arch_option): Change flags field of struct pta to
	int.
	* config/s390/s390.h (s390_tune_flags): Update declaration.
	(s390_arch_flags): Likewise.
	* config/sh/sh.c (prepare_move_operands): Compare
	tls_symbolic_operand result with enum constant.
	(sh_reorg): Change PUT_MODE to PUT_REG_NOTE_KIND.
	(sh_expand_prologue): Add cast to enum type.
	(sh_expand_epilogue): Likewise.
	(tls_symbolic_operand): Change return type to enum tls_model.
	(fpscr_set_from_mem): Add cast to enum type.
	(legitimize_pic_address): Compare tls_symbolic_operand result with
	enum constant.
	(sh_target_reg_class): Change return type to enum reg_class.
	* config/sh/sh.h (OVERRIDE_OPTIONS): Change CPU_xxx to
	PROCESSOR_xxx.
	* config/sh/sh-protos.h (tls_symbolic_operand): Update
	declaration.
	* config/sparc/sparc.c (sparc_override_options): Add cast to enum
	type.
	* config/sparc/sparc.md (empty_delay_slot): Return enum constant.
	(pic, calls_alloca, calls_eh_return, leaf_function): Likewise.
	(delayed_branch, tls_call_delay): Likewise.
	(eligible_for_sibcall_delay): Likewise.
	(eligible_for_return_delay): Likewise. 
	* config/spu/spu.c (expand_builtin_args): Add cast to enum type.
	(spu_expand_builtin_1): Likewise.

	* c-typeck.c (convert_for_assignment): Issue -Wc++-compat warnings
	for all types of conversions.
	(output_init_element): Issue -Wc++-compat warning if needed when
	initializing a bitfield with enum type.
	* c-parser.c (c_parser_expression): Set original_type to
	original_type of right hand operand of comman operator.
cp/:
	* semantics.c (finish_omp_clauses): Change type of c_kind to enum
	omp_clause_code.
fortran/:
	* trans-intrinsic.c (DEFINE_MATH_BUILTIN): Add casts to enum
	type.
	* trans-io.c (st_parameter_field): Add casts to enum type.
java/:
	* builtins.c (java_builtins): Add casts to enum type.
	* verify-impl.c (check_class_constant): Add cast to enum type.
	(check_constant, check_wide_constant): Likewise.
objc/:
	* objc-act.c (objc_gimplify_expr): Add casts to enum type.
testsuite/:
	* gcc.dg/Wcxx-compat-5.c: New testcase.
	* gcc.dg/Wcxx-compat-6.c: New testcase.

From-SVN: r146855
2009-04-27 20:25:48 +00:00
Ian Lance Taylor 32e8bb8ebf combine.c (record_value_for_reg): Change 0 to VOIDmode, twice.
gcc/:
	* combine.c (record_value_for_reg): Change 0 to VOIDmode, twice.
	(record_dead_and_set_regs): Likewise.
	* df.h (struct df_mw_hardreg): Change flags field to int.
	(struct df_base_ref): Likewise.
	(struct df): Change changeable_flags field to int.
	* df-scan.c (df_defs_record): Change clobber_flags to int.
	* dwarf2.h (enum dwarf_tag): Make lo_user and hi_user values enum
	constants rather than #define macros.
	(enum dwarf_attribute, enum dwarf_location_atom): Likewise.
	(enum dwarf_type, enum dwarf_endianity_encoding): Likewise.
	(enum dwarf_calling_convention): Likewise.
	(enum dwarf_line_number_x_ops): Likewise.
	(enum dwarf_call_frame_info): Likewise.
	(enum dwarf_source_language): Likewise.
	* dwarf2out.c (int_loc_descriptor): Add cast to enum type.
	(add_calling_convention_attribute): Likewise.
	* fold-const.c (fold_undefer_overflow_warnings): Add cast to enum
	type.
	(combine_comparisons): Change compcode to int.  Add cast to enum
	type.
	* genrecog.c (maybe_both_true_2): Change c to int.
	(write_switch): Likewise.  Add cast to enum type.
	* gimplify.c (gimplify_omp_for): Handle return values from
	gimplify_expr using MIN rather than bitwise or.
	(gimplify_expr): Add cast to enum type.
	* ipa-prop.c (update_jump_functions_after_inlining): Change
	IPA_BOTTOM to IPA_JF_UNKNOWN.
	* ira.c (setup_class_subset_and_memory_move_costs): Change mode to
	int.  Add casts to enum type.
	(setup_cover_and_important_classes): Change cl to int.  Add casts
	to enum type.
	(setup_class_translate): Change cl and mode to int.
	(ira_init_once): Change mode to int.
	(free_register_move_costs): Likewise.
	(setup_prohibited_mode_move_regs): Add casts to enum type.
	* langhooks.c (add_builtin_function_common): Rework assertion that
	value fits bitfield.
	* mcf.c (add_fixup_edge): Change type parameter to edge_type.
	* omega.c (omega_do_elimination): Avoid math on enum types.
	* optabs.c (expand_vec_shift_expr): Remove casts to int.
	* opts.c (set_debug_level): Change 2 to enum constant.  Use new
	int local to handle integral_argment value.
	* regmove.c (try_auto_increment): Change PUT_MODE to
	PUT_REG_NOTE_KIND.
	* reload.c (push_secondary_reload): Add casts to enum type.
	(secondary_reload_class, find_valid_class): Likewise.
	* reload1.c (emit_input_reload_insns): Likewise.
	* rtl.h (NOTE_VAR_LOCATION_STATUS): Likewise.
	* sel-sched.c (init_hard_regs_data): Change cur_mode to int.
	* sel-sched-ir.c (hash_with_unspec_callback): Change 0 to enum
	constant.
	* tree.c (build_common_builtin_nodes): Add casts to enum type.
	* tree-complex.c (complex_lattice_t): Typedef to int rather than
	enum type.
	(expand_complex_libcall): Add casts to enum type.
	* tree-into-ssa.c (get_ssa_name_ann): Change 0 to enum constant.
	* tree-vect-loop.c (vect_model_reduction_cost): Compare reduc_code
	with ERROR_MARK, not NUM_TREE_CODES.
	(vect_create_epilog_for_reduction): Likewise.
	(vectorizable_reduction): Don't initialize epiloc_reduc_code.
	When not using it, set it to ERROR_MARK rather than
	NUM_TREE_CODES.
	* tree-vect-patterns.c (vect_pattern_recog_1): Change vec_mode to
	enum machine_mode.
	* tree-vect-stmts.c (new_stmt_vec_info): Change 0 to
	vect_unused_in_loop.  Change 0 to loop_vect.
	* tree-vectorizer.c (vect_set_verbosity_level): Add casts to enum
	type.
	* var-tracking.c (get_init_value): Change return type to enum
	var_init_status.
	* vec.h (DEF_VEC_FUNC_P) [iterate]: Cast 0 to type T.
	* config/arm/arm.c (fp_model_for_fpu): Change to array to enum
	arm_fp_model.
	(arm_override_options): Add casts to enum type.
	(arm_emit_tls_decoration): Likewise.
	* config/i386/i386.c (ix86_function_specific_restore): Add casts
	to enum type.
	* config/i386/i386-c.c (ix86_pragma_target_parse): Likewise.
	* config/ia64/ia64.c (ia64_expand_compare): Change magic to int.
	* config/rs6000/rs6000.c (rs6000_override_options): Add casts to
	enum type.
	* config/s390/s390.c (code_for_builtin_64): Change to array of
	enum insn_code.
	(code_for_builtin_31): Likewise.
	(s390_expand_builtin): Change code_for_builtin to enum insn_code
	const *.
	* config/sparc/sparc.c (sparc_override_options): Change value
	field in struct code_model to enum cmodel.  In initializer change
	0 to NULL and add cast to enum type.

	* c-typeck.c (build_modify_expr): Add lhs_origtype parameter.
	Change all callers.  Issue a -Wc++-compat warning using
	lhs_origtype if necessary.
	(convert_for_assignment): Issue -Wc++-compat warnings about
	invalid conversions to enum type on assignment.
	* c-common.h (build_modify_expr): Update declaration.

gcc/cp/:
	* call.c (build_temp): Change 0 to enum constant.
	* cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
	type.
	* cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
	* decl2.c (constrain_visibility): Likewise.
	* parser.c (cp_lexer_get_preprocessor_token): Likewise.
	(cp_parser_flags): Typedef to int rather than enum type.
	(cp_parser_expression_stack_entry): Change prec field to enum
	cp_parser_prec.

	* typeck.c (build_modify_expr): Add lhs_origtype parameter.
	Change all callers.

gcc/fortran/:
	* gfortran.h (enum gfc_symbol_type): New named enum type, broken
	out of struct gfc_symbol.
	(struct gfc_symbol): Use enum gfc_symbol_type.
	(enum gfc_array_ref_dimen_type): New named enum type, broken out
	of struct gfc_array_ref).
	(struct gfc_array_ref): Use enum gfc_array_ref_dimen_type.
	(mod_pointee_as): Update declaration.
	* decl.c (add_global_entry): Change type to enum gfc_symbol_type.
	(gfc_mod_pointee_as): Change return type to "match".
	* module.c (mio_array_ref): Add cast to enum type.
	(mio_symbol): Likewise.
	* resolve.c (resolve_global_procedure): Change type to enum
	gfc_symbol_type.
	* trans-io.c (gfc_build_st_parameter): Change type to unsigned
	int.

gcc/java/:
	* jcf-parse.c (handle_constant): Add cast to enum type.

gcc/objc/:
	* objc-act.c (get_super_receiver): Update calls to
	build_modify_expr to pass new argument.

gcc/testsuite/:
	* gcc.dg/Wcxx-compat-4.c: New testcase.

From-SVN: r146735
2009-04-24 15:31:38 +00:00
Taras Glek d1b382088a hashtab.h: Update GTY annotations to new syntax
2009-04-21  Taras Glek <tglek@mozilla.com>

	* include/hashtab.h: Update GTY annotations to new syntax
	* include/splay-tree.h: Likewise


gcc/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* alias.c: Update GTY annotations to new syntax
	* basic-block.h: Likewise
	* bitmap.h: Likewise
	* c-common.h: Likewise
	* c-decl.c: Likewise
	* c-parser.c: Likewise
	* c-pragma.c: Likewise
	* c-tree.h: Likewise
	* cfgloop.h: Likewise
	* cgraph.h: Likewise
	* config/alpha/alpha.c: Likewise
	* config/arm/arm.h: Likewise
	* config/avr/avr.h: Likewise
	* config/bfin/bfin.c: Likewise
	* config/cris/cris.c: Likewise
	* config/darwin.c: Likewise
	* config/frv/frv.c: Likewise
	* config/i386/i386.c: Likewise
	* config/i386/i386.h: Likewise
	* config/i386/winnt.c: Likewise
	* config/ia64/ia64.h: Likewise
	* config/iq2000/iq2000.c: Likewise
	* config/mips/mips.c: Likewise
	* config/mmix/mmix.h: Likewise
	* config/pa/pa.c: Likewise
	* config/pa/pa.h: Likewise
	* config/rs6000/rs6000.c: Likewise
	* config/s390/s390.c: Likewise
	* config/sparc/sparc.c: Likewise
	* config/xtensa/xtensa.c: Likewise
	* cselib.h: Likewise
	* dbxout.c: Likewise
	* dwarf2out.c: Likewise
	* except.c: Likewise
	* except.h: Likewise
	* fixed-value.h: Likewise
	* function.c: Likewise
	* function.h: Likewise
	* gimple.h: Likewise
	* integrate.c: Likewise
	* optabs.c: Likewise
	* output.h: Likewise
	* real.h: Likewise
	* rtl.h: Likewise
	* stringpool.c: Likewise
	* tree-data-ref.c: Likewise
	* tree-flow.h: Likewise
	* tree-scalar-evolution.c: Likewise
	* tree-ssa-address.c: Likewise
	* tree-ssa-alias.h: Likewise
	* tree-ssa-operands.h: Likewise
	* tree.c: Likewise
	* tree.h: Likewise
	* varasm.c: Likewise
	* varray.h: Likewise
	* vec.h: Likewise
	* coretypes.h: Do not define GTY macro if it is already defined
	* doc/gty.texi: Update GTY documentation to new syntax
	* gengtype-lex.l: Enforce attribute-like syntax for GTY annotations on structs
	* gengtype-parse.c: Likewise


gcc/ada/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* gcc-interface/ada-tree.h: Update GTY annotations to new syntax
	* gcc-interface/trans.c: Likewise
	* gcc-interface/utils.c: Likewise


gcc/cp/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* cp-tree.h: Update GTY annotations to new syntax
	* decl.c: Likewise
	* mangle.c: Likewise
	* name-lookup.c: Likewise
	* name-lookup.h: Likewise
	* parser.c: Likewise
	* pt.c: Likewise
	* rtti.c: Likewise
	* semantics.c: Likewise
	* typeck2.c: Likewise


gcc/fortran/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* f95-lang.c: Update GTY annotations to new syntax
	* trans-intrinsic.c: Likewise
	* trans-io.c: Likewise
	* trans.h: Likewise


gcc/java/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* builtins.c: Update GTY annotations to new syntax
	* decl.c: Likewise
	* java-tree.h: Likewise
	* jcf.h: Likewise
	* lang.c: Likewise


gcc/objc/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* objc-act.c: Update GTY annotations to new syntax
	* objc-act.h: Likewise


libcpp/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* include/cpp-id-data.h: Update GTY annotations to new syntax
	* include/cpplib.h: Likewise
	* include/line-map.h: Likewise
	* include/symtab.h: Likewise

From-SVN: r146607
2009-04-22 14:29:36 -04:00
Joseph Myers ad41bd84ff ABOUT-GCC-NLS, [...]: Add copyright and license notices.
* ABOUT-GCC-NLS, ChangeLog, ChangeLog-1997, ChangeLog-1998,
	ChangeLog-1999, ChangeLog-2000, ChangeLog-2001, ChangeLog-2002,
	ChangeLog-2003, ChangeLog-2004, ChangeLog-2005, ChangeLog-2006,
	ChangeLog-2007, ChangeLog-2008, ChangeLog.dataflow, ChangeLog.lib,
	ChangeLog.ptr, ChangeLog.tree-ssa, ChangeLog.tuples, FSFChangeLog,
	FSFChangeLog.10, FSFChangeLog.11, LANGUAGES, ONEWS, acinclude.m4,
	config/alpha/gnu.h, config/alpha/libgcc-alpha-ldbl.ver,
	config/alpha/t-osf4, config/alpha/t-vms, config/alpha/va_list.h,
	config/alpha/x-vms, config/arc/t-arc,
	config/arm/README-interworking, config/arm/arm-c.c,
	config/arm/gentune.sh, config/arm/libgcc-bpabi.ver,
	config/arm/t-arm, config/arm/t-arm-elf, config/arm/t-arm-softfp,
	config/arm/t-bpabi, config/arm/t-linux, config/arm/t-linux-eabi,
	config/arm/t-netbsd, config/arm/t-pe, config/arm/t-strongarm-elf,
	config/arm/t-symbian, config/arm/t-vxworks, config/arm/t-wince-pe,
	config/avr/t-avr, config/bfin/elf.h, config/bfin/libgcc-bfin.ver,
	config/bfin/linux.h, config/bfin/t-bfin, config/bfin/t-bfin-elf,
	config/bfin/t-bfin-linux, config/bfin/t-bfin-uclinux,
	config/bfin/uclinux.h, config/cris/mulsi3.asm, config/cris/t-cris,
	config/cris/t-elfmulti, config/crx/t-crx,
	config/darwin-ppc-ldouble-patch.def, config/darwin-sections.def,
	config/divmod.c, config/fr30/t-fr30, config/frv/libgcc-frv.ver,
	config/frv/t-frv, config/frv/t-linux, config/h8300/genmova.sh,
	config/h8300/t-h8300, config/i386/athlon.md,
	config/i386/darwin-libgcc.10.4.ver,
	config/i386/darwin-libgcc.10.5.ver, config/i386/libgcc-glibc.ver,
	config/i386/mach.h, config/i386/netbsd.h, config/i386/t-crtpc,
	config/i386/t-cygming, config/i386/t-cygwin, config/i386/t-i386,
	config/i386/t-linux64, config/i386/t-nwld,
	config/i386/t-rtems-i386, config/i386/t-sol2-10,
	config/i386/x-mingw32, config/ia64/div.md, config/ia64/elf.h,
	config/ia64/ia64.opt, config/ia64/libgcc-glibc.ver,
	config/ia64/libgcc-ia64.ver, config/ia64/linux.h,
	config/ia64/sysv4.h, config/ia64/t-hpux, config/ia64/t-ia64,
	config/iq2000/abi, config/iq2000/lib2extra-funcs.c,
	config/iq2000/t-iq2000, config/libgcc-glibc.ver,
	config/m32r/libgcc-glibc.ver, config/m32r/t-linux,
	config/m32r/t-m32r, config/m68hc11/t-m68hc11,
	config/m68k/t-floatlib, config/m68k/t-linux, config/m68k/t-mlibs,
	config/m68k/t-uclinux, config/mcore/t-mcore,
	config/mcore/t-mcore-pe, config/mips/20kc.md, config/mips/4130.md,
	config/mips/5400.md, config/mips/5500.md, config/mips/crti.asm,
	config/mips/crtn.asm, config/mips/irix-crti.asm,
	config/mips/irix-crtn.asm, config/mips/libgcc-mips16.ver,
	config/mips/mips-dsp.md, config/mips/mips-dspr2.md,
	config/mips/mips-fixed.md, config/mips/sb1.md,
	config/mips/sr71k.md, config/mips/t-elf, config/mips/t-gofast,
	config/mips/t-iris6, config/mips/t-isa3264,
	config/mips/t-libgcc-mips16, config/mips/t-linux64,
	config/mips/t-mips, config/mips/t-r3900, config/mips/t-rtems,
	config/mips/t-sb1, config/mips/t-sde, config/mips/t-sdemtk,
	config/mips/t-slibgcc-irix, config/mips/t-sr71k, config/mips/t-st,
	config/mips/t-vr, config/mips/t-vxworks, config/mmix/t-mmix,
	config/mn10300/t-linux, config/mn10300/t-mn10300,
	config/pa/pa32-regs.h, config/pa/t-hpux-shlib, config/pa/t-linux,
	config/pa/t-linux64, config/pa/t-pa64, config/pdp11/t-pdp11,
	config/picochip/libgccExtras/clzsi2.asm,
	config/picochip/t-picochip, config/rs6000/darwin-ldouble-format,
	config/rs6000/darwin-libgcc.10.4.ver,
	config/rs6000/darwin-libgcc.10.5.ver,
	config/rs6000/libgcc-ppc-glibc.ver, config/rs6000/ppc-asm.h,
	config/rs6000/t-aix43, config/rs6000/t-aix52,
	config/rs6000/t-darwin, config/rs6000/t-fprules,
	config/rs6000/t-fprules-fpbit, config/rs6000/t-linux64,
	config/rs6000/t-lynx, config/rs6000/t-netbsd,
	config/rs6000/t-ppccomm, config/rs6000/t-ppcendian,
	config/rs6000/t-ppcgas, config/rs6000/t-rs6000,
	config/rs6000/t-rtems, config/rs6000/t-spe,
	config/rs6000/t-vxworks, config/s390/libgcc-glibc.ver,
	config/score/t-score-elf, config/sh/divcost-analysis,
	config/sh/libgcc-glibc.ver, config/sh/t-netbsd, config/sh/t-sh,
	config/sh/t-sh64, config/sh/t-superh, config/sh/t-symbian,
	config/sparc/libgcc-sparc-glibc.ver, config/sparc/sol2-bi.h,
	config/sparc/sol2-gas.h, config/sparc/sol2-gld-bi.h,
	config/sparc/t-elf, config/sparc/t-linux64, config/sparc/t-sol2,
	config/stormy16/stormy-abi, config/stormy16/t-stormy16,
	config/t-darwin, config/t-libunwind, config/t-libunwind-elf,
	config/t-linux, config/t-lynx, config/t-slibgcc-elf-ver,
	config/t-slibgcc-sld, config/t-sol2, config/t-vxworks,
	config/udivmod.c, config/udivmodsi4.c, config/v850/t-v850,
	config/v850/t-v850e, config/xtensa/t-xtensa, diagnostic.def,
	gdbinit.in, glimits.h, gstab.h, gsyms.h, java/ChangeLog,
	java/ChangeLog.ptr, java/ChangeLog.tree-ssa, libgcc-std.ver,
	limitx.h, version.c, xcoff.h: Add copyright and license notices.
	* config/h8300/genmova.sh: Include copyright and license notices
	in generated output.
	* config/h8300/mova.md: Regenerate.
	* doc/install.texi2html: Include word "Copyright" in copyright
	notice and use name "Free Software Foundation, Inc.".
	* ChangeLog, ChangeLog-2000, ChangeLog-2001, ChangeLog-2002,
	ChangeLog-2003, ChangeLog-2004, ChangeLog-2005, ChangeLog-2006,
	ChangeLog-2007, ChangeLog-2008: Correct dates.

ada:
	* ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
	license notices.

cp:
	* ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
	ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
	ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
	ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
	ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
	cfns.gperf: Add copyright and license notices.
	* cfns.h: Regenerate.
	* ChangeLog, ChangeLog-2004: Correct dates.

fortran:
	* ChangeLog, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004,
	ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008,
	ChangeLog.ptr, config-lang.in, ioparm.def, mathbuiltins.def: Add
	copyright and license notices.
	* ChangeLog, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
	ChangeLog-2008: Correct dates.

java:
	* ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
	license notices.

objc:
	* ChangeLog: Add copyright and license notices.

objcp:
	* ChangeLog: Add copyright and license notices.

po:
	* ChangeLog, EXCLUDES: Add copyright and license notices.

testsuite:
	* ChangeLog, ChangeLog-1993-2007, ChangeLog-2008, ChangeLog.ptr,
	ChangeLog.tree-ssa, README, README.QMTEST, README.compat,
	README.gcc, g++.dg/README, g++.dg/compat/break/README,
	g++.dg/gomp/gomp.exp, g++.old-deja/g++.brendan/README,
	g++.old-deja/g++.oliva/ChangeLog, g++.old-deja/g++.robertl/README,
	gcc.c-torture/ChangeLog.0,
	gcc.c-torture/execute/builtins/builtins.exp, gcc.dg/README,
	gcc.dg/gomp/gomp.exp, gcc.target/frv/frv.exp,
	gcc.target/i386/math-torture/math-torture.exp,
	gcc.target/mips/inter/mips16-inter.exp,
	gcc.target/mips/mips-nonpic/README,
	gcc.target/x86_64/abi/README.gcc,
	gcc.target/xstormy16/xstormy16.exp, gcc.test-framework/README,
	gfortran.dg/g77/README, gfortran.dg/gomp/gomp.exp,
	gfortran.fortran-torture/ChangeLog.g95: Add copyright and license
	notices.
	* ChangeLog-1993-2007, ChangeLog: Correct dates.

From-SVN: r146533
2009-04-21 20:03:23 +01:00
Ian Lance Taylor bbbbb16a88 Fix enum conversions which are invalid in C++:
gcc/:
	Fix enum conversions which are invalid in C++:
	* auto-inc-dec.c (attempt_change): Change 0 to SET in function
	call.
	* calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function
	call.
	* cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call.
	* dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type.
	* dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function
	call.
	(dbxout_parms): Likewise.
	* df-core.c (df_set_flags): Change changeable_flags parameter to
	int.
	(df_clear_flags): Likewise.
	* df-problems.c (df_rd_bb_local_compute_process_def): Change
	top_flag parameter to int.
	(df_chain_create_bb_process_use): Likewise.
	(df_chain_add_problem): Change chain_flags parameter to unsigned
	int.  Remove cast.
	* df-scan.c (df_ref_create): Change ref_flags parameter to int.
	(df_ref_create_structure, df_def_record_1): Likewise.
	(df_defs_record, df_uses_record, df_get_call_refs): Likewise.
	(df_notes_rescan): Change 0 to VOIDmode in function call.
	(df_get_call_refs, df_insn_refs_collect): Likewise.
	(df_bb_regs_collect): Likewise.
	(df_entry_block_defs_collect): Likewise.
	(df_exit_block_uses_collect): Likewise.
	* df.h: Update declarations.
	* double-int.c (double_int_divmod): Add cast to enum type.
	* dse.c (replace_inc_dec): Reverse parameters to gen_int_mode.
	* dwarf2out.c (new_reg_loc_descr): Add casts to enum type.
	(based_loc_descr): Likewise.
	(loc_descriptor_from_tree_1): Change first_op and second_op to
	enum dwarf_location_atom.  Add cast to enum type.
	* expmed.c (init_expmed): Change 0 to SET in function call.
	* expr.c (init_expr_target): Change 0 to VOIDmode in function
	call.
	(expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call.
	(do_store_flag): Likewise.
	* fixed-value.h (struct fixed_value): Change mode to enum
	machine_mode.
	* function.c (assign_parms): Change 0 to VOIDmode in function
	call.
	* genautomata.c (insert_automaton_decl): Change 1 to INSERT in
	function call.
	(insert_insn_decl, insert_decl, insert_state): Likewise.
	(automata_list_finish): Likewise.
	* genrecog.c (process_define_predicate): Add cast to enum type.
	* gensupport.c (init_predicate_table): Add cast to enum type.
	* gimple.c (gimple_build_return): Change 0 to ERROR_MARK in
	function call.
	(gimple_build_call_1, gimple_build_label): Likewise.
	(gimple_build_goto, gimple_build_asm_1): Likewise.
	(gimple_build_switch_1, gimple_build_cdt): Likewise.
	* gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function
	call.
	(enum fallback): Rename from enum fallback_t.
	(fallback_t): Typedef as int.
	* gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to
	GSI_SAME_STMT in function call.
	* ira.c (setup_class_subset_and_memory_move_costs): Add casts to
	enum type.
	(setup_reg_class_relations): Likewise.
	(setup_reg_class_nregs): Change cl to int.  Add casts to enum
	type.
	(setup_prohibited_class_mode_regs): Add cast to enum type.
	(setup_prohibited_mode_move_regs): Likewise.
	* ira-costs.c (record_reg_classes): Change rclass to enum
	reg_class.
	(record_address_regs): Change i to enum reg_class.
	* lists.c (alloc_EXPR_LIST): Add cast to enum type.
	* machmode.h (GET_MODE_CLASS): Cast value to enum mode_class.
	(GET_MODE_WIDER_MODE): Cast value to enum machine_mode.
	(GET_MODE_2XWIDER_MODE): Likewise.
	(GET_CLASS_NARROWEST_MODE): Likewise.
	* omp-low.c (expand_omp_for): Add cast to enum type.
	* optabs.c (debug_optab_libfuncs): Add casts to enum type.
	* opts.c (enable_warning_as_error): Change kind to diagostic_t.
	* postreload.c (reload_cse_simplify_operands): Change rclass local
	to enum reg_class.
	* predict.c (combine_predictions_for_insn): Change best_predictor
	and predictor to enum br_predictor.
	(combine_predictions_for_bb): Likewise.
	(build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to
	use SET_PREDICT_EXPR_OUTCOME.
	* real.c (real_arithmetic): Change icode to code in function
	call.
	* reginfo.c (init_move_cost): Add casts to enum type.
	(init_reg_sets_1, init_fake_stack_mems): Likewise.
	* regmove.c (regclass_compatible_p): Change class0 and class1 to
	enum reg_class.
	* reload.c (find_valid_class): Add casts to enum type.
	(push_reload): Change 0 to NO_REGS in function call.
	(find_reloads): Change this_alternative to array of enum
	reg_class.  Remove some now-unnecessary casts.
	(make_memloc): Change 0 to VOIDmode in function call.
	* reload1.c (reload): Change 0 to VOIDmode in function call.
	(eliminate_regs_1, elimination_effects): Likewise.
	(eliminate_regs_in_insn): Likewise.
	(emit_input_reload_insns): Add cast to enum type.
	(delete_output_reload): Change 0 to VOIDmode in function call.
	* reorg.c (insn_sets_resource_p): Convert include_delayed_effects
	to enum type in function call.
	* tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type.
	(SET_PREDICT_EXPR_OUTCOME): Define.
	* tree-dump.c (get_dump_file_info): Change phase parameter to
	int.
	(get_dump_file_name, dump_begin, dump_enabled_p): Likewise.
	(dump_initialized_p, dump_flag_name, dump_end): Likewise.
	(dump_function): Likewise.
	* tree-dump.h: Update declarations.
	* tree-pass.h: Update declarations.
	* varasm.c (assemble_integer): Change mclass to enum mode_class.
	* config/arm/arm.c (thumb_legitimize_reload_address): Add cast to
	enum type.
	(arm_rtx_costs_1): Correct parenthesization.
	(arm_rtx_costs): Add casts to enum type.
	(adjacent_mem_locations): Reverse arguments to const_ok_for_op.
	(vfp_emit_fstmd): Use add_rg_note.
	(emit_multi_reg_push, emit_sfm): Likewise.
	(thumb_set_frame_pointer): Likewise.
	(arm_expand_prologue): Likewise.
	(arm_regno_class): Change return type to enum reg_class.
	(thumb1_expand_prologue): Use add_reg_note.
	* config/arm/arm-protos.h (arm_regno_class): Update declaration.
	* config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL
	in function call.
	* config/arm/gentune.sh: Add cast to enum type.
	* config/arm/arm-tune.md: Rebuild.
	* config/i386/i386.c (ix86_expand_prologue): Use add_reg_note.
	(ix86_split_fp_branch, predict_jump): Likewise.
	(ix86_expand_multi_arg_builtin): Change sub_code from enum
	insn_code to enum rtx_code.
	(ix86_builtin_vectorized_function): Add cast to enum type.
	* config/i386/i386.md (truncdfsf2): Change slot to enum
	ix86_stack_slot.
	(truncxf<mode>2, isinf<mode>2): Likewise.
	* config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to
	enum type.
	* config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note.
	(spill_restore_mem, do_spill, ia64_expand_prologue): Likewise.
	(insert_bundle_state): Change 1 to INSERT in function call.
	(ia64_add_bundle_selector_before): Likewise.
	* config/ia64/ia64.md (cpu attr): Add cast to enum type.
	(save_stack_nonlocal): Change 0 to LCT_NORMAL in function call.
	(restore_stack_nonlocal): Likewise.
	* config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in
	function call.
	* config/mips/mips.c (mips_binary_cost): Change 0 to SET in
	function call.
	(mips_rtx_costs): Likewise.
	(mips_override_options): Add casts to enum type.
	* config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL
	in function call.
	* config/pa/pa.c (legitimize_pic_address): Use add_reg_note.
	(store_reg, set_reg_plus_d): Likewise.
	(hppa_expand_prologue, hppa_profile_hook): Likewise.
	* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add
	cast to enum type.
	(altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in
	function call.
	(emit_unlikely_jump): Use add_reg_note.
	(rs6000_emit_allocate_stack): Likewise.
	(rs6000_frame_related, rs6000_emit_prologue): Likewise.
	(output_toc): Change 1 to INSERT in function call.
	(output_profile_hook): Change 0 to LCT_NORMAL in function call.
	(rs6000_initialize_trampoline): Likewise.
	(rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in
	function call.
	* config/s390/s390.c (s390_rtx_costs): Add cast to enum type.
	(s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call.
	(s390_expand_setmem, s390_expand_cmpmem): Likewise.
	(save_gprs): Use add_reg_note.
	(s390_emit_prologue): Likewise.
	(s390_expand_builtin): Change 0 to EXPAND_NORMAL in function
	call.
	* config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note.
	(sparc_fold_builtin): Add cast to enum type.
	* config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to
	enum insn_code.
	(spu_expand_prologue): Use add_reg_note.
	(expand_builtin_args): Change 0 to EXPAND_NORMAL in function
	call.

	* c-parser.c (c_parser_attributes): Change VEC back to tree list.
	(c_parser_postfix_expression_after_primary): Get VEC for list of
	arguments.  Get original types of arguments.  Call
	build_function_call_vec.
	(cached_expr_list_1, cached_expr_list_2): New static variables.
	(c_parser_expr_list): Change return type to VEC *.  Add
	p_orig_types parameter.  Change all callers.
	(c_parser_release_expr): New static function.
	(c_parser_vec_to_tree_list): New static function.
	* c-typeck.c (build_function_call): Rewrite to build a VEC and
	call build_function_call_vec.
	(build_function_call_vec): New function, based on old
	build_function_call.
	(convert_arguments): Remove nargs and argarray parameters.  Change
	values to a VEC.  Add origtypes parameter.
	(build_modify_expr): Add rhs_origtype parameter.  Change all
	callers.
	(convert_for_assignment): Add origtype parameter.  Change all
	callers.  If warn_cxx_compat, check for conversion to an enum
	type when calling a function.
	(store_init_value): Add origtype parameter.  Change all callers.
	(digest_init): Likewise.
	(struct init_node): Add origtype field.
	(add_pending_init): Add origtype parameter.  Change all callers.
	(output_init_element): Likewise.
	(output_pending_init_elements): Pass origtype from init_node to
	output_init_element.
	(process_init_elemnt): Pass origtype from c_expr to
	output_init_element.
	(c_finish_return): Add origtype parameter.  Change all callers.
	* c-common.c (sync_resolve_size): Change params to VEC *.  Change
	caller.
	(sync_resolve_params): Likewise.
	(sync_resolve_return): Change params to first_param.  Change
	caller.
	(resolve_overloaded_builtins): Change params to VEC *.  Change
	callers.   Save first parameter around call to
	build_function_call_vec.
	* c-decl.c (finish_decl): Add origtype parameter.  Change all
	callers.  Call build_function_call_vec rather than
	build_function_call for cleanup.
	* c-tree.h: Update declarations.
	* c-common.h: Update declarations.
	* stub-objc.c (objc_rewrite_function_call): Change parameter from
	params to first_param.
	* target.h (struct gcc_target): Change resolve_overloaded_builtin
	params parameter from tree to void *.
	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
	Change arglist parameter to have type void *, and to be a pointer
	to a VEC.
	* config/rs6000/rs6000-protos.h
	(altivec_resolve_overloaded_builtin): Update declaration.
	* config/spu/spu-c.c (spu_resolved_overloaded_builtin): Change
	fnargs parameter to have type void *, and to be a pointer to a
	VEC.  Call build_function_call_vec instead of
	build_function_call.
	* config/spu/spu-protos.h (spu_expand_builtin): Update
	declaration.

gcc/cp/:
	* typeck.c (build_function_call_vec): New function.
	(cp_build_function_call): Only pass first parameter to
	objc_rewrite_function_call.
	(build_modify_expr): Add rhs_origtype parameter.  Change all
	callers.
	* decl.c (finish_decl): Add origtype parameter.  Change all
	callers.
	* semantics.c (finish_call_expr): Pass VEC to
	resolve_overloaded_builtin.

gcc/objc:
	* objc-act.c (objc_rewrite_function_call): Change parameter from
	params to first_param.  Change all callers.

gcc/testsuite:
	* gcc.dg/Wcxx-compat-3.c: New testcase.

From-SVN: r146451
2009-04-20 19:35:00 +00:00
David Ayers 52daca759f re PR objc/29200 (%s substituted with "methods"/"selectors" can't be properly translated)
gcc/
2009-04-09  David Ayers  <ayers@fsfe.org>

	PR objc/29200
	* objc/objc-act.c (warn_with_method): Remove helper function.
	(check_duplicates): Call warning and inform directly.
	(really_start_method): Likewise.

From-SVN: r145857
2009-04-09 21:08:18 +00:00
Dominique d'Humieres 77a08224ee re PR bootstrap/39583 (Revision 145255 breaks bootstrap with obj-c++)
2009-03-30  Dominique d'Humieres  <dominiq@lps.ens.fr>

	PR bootstrap/39583
	* objc-act.c (in_late_binary_op): Define for Objective-C++.

From-SVN: r145290
2009-03-30 13:59:27 +01:00
Joseph Myers 928c19bbb0 re PR c/456 (constant expressions constraints (gcc.dg/c90-const-expr-1))
PR c/456
	PR c/5675
	PR c/19976
	PR c/29116
	PR c/31871
	PR c/35198

fixincludes:
	* inclhack.def (glibc_tgmath): New fix.
	* fixincl.x: Regenerate.
	* tests/base/tgmath.h: New.

gcc:
	* builtins.c (fold_builtin_sincos): Build COMPOUND_EXPR in
	void_type_node.
	(fold_call_expr): Return a NOP_EXPR from folding rather than the
	contained expression.
	* c-common.c (c_fully_fold, c_fully_fold_internal, c_save_expr):
	New.
	(c_common_truthvalue_conversion): Use c_save_expr.  Do not fold
	conditional expressions for C.
	(decl_constant_value_for_optimization): Move from
	decl_constant_value_for_broken_optimization in c-typeck.c.  Check
	whether optimizing and that the expression is a VAR_DECL not of
	array type instead of doing such checks in the caller.  Do not
	check pedantic.  Call gcc_unreachable for C++.
	* c-common.def (C_MAYBE_CONST_EXPR): New.
	* c-common.h (c_fully_fold, c_save_expr,
	decl_constant_value_for_optimization): New prototypes.
	(C_MAYBE_CONST_EXPR_PRE, C_MAYBE_CONST_EXPR_EXPR,
	C_MAYBE_CONST_EXPR_INT_OPERANDS, C_MAYBE_CONST_EXPR_NON_CONST,
	EXPR_INT_CONST_OPERANDS): Define.
	* c-convert.c (convert): Strip nops from expression.
	* c-decl.c (groktypename): Take extra parameters expr and
	expr_const_operands.  Update call to grokdeclarator.
	(start_decl): Update call to grokdeclarator.  Add statement for
	expressions used in type of decl.
	(grokparm): Update call to grokdeclarator.
	(push_parm_decl): Update call to grokdeclarator.
	(build_compound_literal): Add parameter non_const and build a
	C_MAYBE_COSNT_EXPR if applicable.
	(grokdeclarator): Take extra parameters expr and
	expr_const_operands.  Track expressions used in declaration
	specifiers and declarators.  Fold array sizes and track whether
	they are constant expressions and whether they are integer
	constant expressions.
	(parser_xref_tag): Set expr and expr_const_operands fields in
	return value.
	(grokfield): Update call to grokdeclarator.
	(start_function): Update call to grokdeclarator.
	(build_null_declspecs): Set expr and expr_const_operands fields in
	return value.
	(declspecs_add_type): Handle expressions in typeof specifiers.
	* c-parser.c (c_parser_declspecs): Set expr and
	expr_const_operands fields for declaration specifiers.
	(c_parser_enum_specifier): Likewise.
	(c_parser_struct_or_union_specifier): Likewise.
	(c_parser_typeof_specifier): Likewise.  Update call to
	groktypename.  Fold expression as needed.  Return expressions with
	type instead of adding statements.
	(c_parser_attributes): Update calls to c_parser_expr_list.
	(c_parser_statement_after_labels): Fold expression before passing
	to objc_build_throw_stmt.
	(c_parser_condition): Fold expression.
	(c_parser_asm_operands): Fold expression.
	(c_parser_conditional_expression): Use c_save_expr.  Update call
	to build_conditional_expr.
	(c_parser_alignof_expression): Update call to groktypename.
	(c_parser_postfix_expression): Preserve C_MAYBE_CONST_EXPR as
	original_code.  Fold expression argument of va_arg.  Create
	C_MAYBE_CONST_EXPR to preserve side effects of expressions in type
	argument to va_arg.  Update calls to groktypename.  Fold array
	index for offsetof.  Verify that first argument to
	__builtin_choose_expr has integer type.
	(c_parser_postfix_expression_after_paren_type): Update calls to
	groktypename and build_compound_literal.  Handle expressions with
	side effects in type name.
	(c_parser_postfix_expression_after_primary): Update call to
	c_parser_expr_list.  Set original_code for calls to
	__builtin_constant_p.
	(c_parser_expr_list): Take extra parameter fold_p.  Fold
	expressions if requested.
	(c_parser_objc_type_name): Update call to groktypename.
	(c_parser_objc_synchronized_statement): Fold expression.
	(c_parser_objc_receiver): Fold expression.
	(c_parser_objc_keywordexpr): Update call to c_parser_expr_list.
	(c_parser_omp_clause_num_threads, c_parser_omp_clause_schedule,
	c_parser_omp_atomic, c_parser_omp_for_loop): Fold expressions.
	* c-tree.h (CONSTRUCTOR_NON_CONST): Define.
	(struct c_typespec): Add elements expr and expr_const_operands.
	(struct c_declspecs): Add elements expr and expr_const_operands.
	(groktypename, build_conditional_expr, build_compound_literal):
	Update prototypes.
	(in_late_binary_op): Declare.
	* c-typeck.c (note_integer_operands): New function.
	(in_late_binary_op): New variable.
	(decl_constant_value_for_broken_optimization): Move to c-common.c
	and rename to decl_constant_value_for_optimization.
	(default_function_array_conversion): Do not strip nops.
	(default_conversion): Do not call
	decl_constant_value_for_broken_optimization.
	(build_array_ref): Do not fold result.
	(c_expr_sizeof_expr): Fold operand.  Use C_MAYBE_CONST_EXPR for
	result when operand is a VLA.
	(c_expr_sizeof_type): Update call to groktypename.  Handle
	expressions included in type name.  Use C_MAYBE_CONST_EXPR for
	result when operand names a VLA type.
	(build_function_call): Update call to build_compound_literal.
	Only fold result for calls to __builtin_* functions.  Strip
	NOP_EXPR from INTEGER_CST returned from such functions.  Fold
	the function designator.
	(convert_arguments): Fold arguments.  Update call to
	convert_for_assignment.
	(build_unary_op): Handle increment and decrement of
	C_MAYBE_CONST_EXPR.  Move lvalue checks for increment and
	decrement earlier.  Fold operand of increment and decrement.
	Handle address of C_MAYBE_CONST_EXPR.  Only fold expression being
	built for integer operand.  Wrap returns that are INTEGER_CSTs
	without being integer constant expressions or that have integer
	constant operands without being INTEGER_CSTs.
	(lvalue_p): Handle C_MAYBE_CONST_EXPR.
	(build_conditional_expr): Add operand ifexp_bcp.  Track whether
	result is an integer constant expression or can be used in
	unevaluated parts of one and avoid folding and wrap as
	appropriate.  Fold operands before possibly doing -Wsign-compare
	warnings.
	(build_compound_expr): Wrap result for C99 if operands can be used
	in integer constant expressions.
	(build_c_cast): Update call to digest_init.  Do not ignore
	overflow from casting floating-point constants to integers.  Wrap
	results that could be confused with integer constant expressions,
	null pointer constants or floating-point constants.
	(c_cast_expr): Update call to groktypename.  Handle expressions
	included in type name.
	(build_modify_expr): Handle modifying a C_MAYBE_CONST_EXPR.  Fold
	lhs inside possible SAVE_EXPR.  Fold RHS before assignment.
	Update calls to convert_for_assignment.
	(convert_for_assignment): Take new parameter
	null_pointer_constant.  Do not strip nops or call
	decl_constant_value_for_broken_optimization.  Set
	in_late_binary_op for conversions to boolean.
	(store_init_value): Update call to digest_init.
	(digest_init): Take new parameter null_pointer_constant.  Do not
	call decl_constant_value_for_broken_optimization.  pedwarn for
	initializers not constant expressions.  Update calls to
	convert_for_assignment.
	(constructor_nonconst): New.
	(struct constructor_stack): Add nonconst element.
	(really_start_incremental_init, push_init_level, pop_init_level):
	Handle constructor_nonconst and nonconst element.
	(set_init_index): Call constant_expression_warning for array
	designators.
	(output_init_element): Fold value.  Set constructor_nonconst as
	applicable.  pedwarn for initializers not constant expressions.
	Update call to digest_init.  Call constant_expression_warning
	where constant initializers are required.
	(process_init_element): Use c_save_expr.
	(c_finish_goto_ptr): Fold expression.
	(c_finish_return): Fold return value.  Update call to
	convert_for_assignment.
	(c_start_case): Fold switch expression.
	(c_process_expr_stmt): Fold expression.
	(c_finish_stmt_expr): Create C_MAYBE_CONST_EXPR as needed to
	ensure statement expression is not evaluated in constant
	expression.
	(build_binary_op): Track whether results are integer constant
	expressions or may occur in such, disable folding and wrap results
	as applicable.  Fold operands for -Wsign-compare warnings unless
	in_late_binary_op.
	(c_objc_common_truthvalue_conversion): Handle results folded to
	integer constants that are not integer constant expressions.
	* doc/extend.texi: Document when typeof operands are evaluated,
	that condition of __builtin_choose_expr is an integer constant
	expression, and more about use of __builtin_constant_p in
	initializers.

gcc/objc:
	* objc-act.c (objc_finish_try_stmt): Set in_late_binary_op.

gcc/testsuite:
	* gcc.c-torture/compile/20081108-1.c,
	gcc.c-torture/compile/20081108-2.c,
	gcc.c-torture/compile/20081108-3.c, gcc.dg/bconstp-2.c,
	gcc.dg/bconstp-3.c, gcc.dg/bconstp-4.c, gcc.dg/c90-const-expr-6.c,
	gcc.dg/c90-const-expr-7.c, gcc.dg/c90-const-expr-8.c,
	gcc.dg/c90-const-expr-9.c, gcc.dg/c90-const-expr-10.c,
	gcc.dg/c90-const-expr-11.c, gcc.dg/c99-const-expr-6.c,
	gcc.dg/c99-const-expr-7.c, gcc.dg/c99-const-expr-8.c,
	gcc.dg/c99-const-expr-9.c, gcc.dg/c99-const-expr-10.c,
	gcc.dg/c99-const-expr-11.c, gcc.dg/c99-const-expr-12.c,
	gcc.dg/c99-const-expr-13.c, gcc.dg/compare10.c,
	gcc.dg/gnu89-const-expr-1.c, gcc.dg/gnu89-const-expr-2.c,
	gcc.dg/gnu99-const-expr-1.c, gcc.dg/gnu99-const-expr-2.c,
	gcc.dg/gnu99-const-expr-3.c, gcc.dg/vla-12.c, gcc.dg/vla-13.c,
	gcc.dg/vla-14.c, gcc.dg/vla-15.c, gcc.dg/vla-16.c: New tests.
	* gcc.dg/c90-const-expr-1.c, gcc.dg/c90-const-expr-2.c,
	gcc.dg/c90-const-expr-3.c, gcc.dg/c99-const-expr-2.c,
	gcc.dg/c99-const-expr-3.c, gcc.dg/c99-static-1.c: Remove XFAILs.
	* gcc.dg/c90-const-expr-2.c: Use ZERO in place of 0 in another
	case.
	* gcc.dg/overflow-warn-1.c, gcc.dg/overflow-warn-2.c,
	gcc.dg/overflow-warn-3.c, gcc.dg/overflow-warn-4.c: Remove
	XFAILs.  Update expected messages.
	* gcc.dg/pr14649-1.c, gcc.dg/pr19984.c, gcc.dg/pr25682.c: Update
	expected messages.
	* gcc.dg/real-const-1.c: Replace with test from original PR.
	* gcc.dg/vect/pr32230.c: Use intermediate cast to __PTRDIFF_TYPE__
	when casting from non-constant integer to pointer.

From-SVN: r145254
2009-03-29 19:13:43 +01:00
Jakub Jelinek 66647d441f Update Copyright years for files modified in 2008 and/or 2009.
From-SVN: r144324
2009-02-20 16:20:38 +01:00
Eric Botcazou 9ff4a9dade Fix dates.
From-SVN: r142470
2008-12-05 11:46:36 +00:00
Jakub Jelinek 250d2fb5b2 re PR bootstrap/38262 (GCC components unnecessarily link with shared gmp/mpfr)
PR bootstrap/38262
	Fixup ChangeLog entries.

From-SVN: r142466
2008-12-05 09:50:47 +01:00
Sebastian Pop f773bb8482 re PR bootstrap/38262 (GCC components unnecessarily link with shared gmp/mpfr)
2008-11-07  Sebastian Pop  <sebastian.pop@amd.com>

	PR bootstrap/38262
	* java/Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
	* objc/Make-lang.in (cc1obj-dummy, cc1obj): Same.
	* objcp/Make-lang.in (cc1objplus-dummy, cc1objplus): Same.
	* cp/Make-lang.in (cc1plus-dummy, cc1plus): Same.
	* ada/gcc-interface/Make-lang.in (gnat1): Same.
	* fortran/Make-lang.in (f951): Same.
	* Makefile.in (LIBS): Remove GMPLIBS, CLOOGLIBS and PPLLIBS.
	(BACKENDLIBS): New.
	(cc1-dummy, cc1): Add BACKENDLIBS, remove GMPLIBS.

From-SVN: r142464
2008-12-05 08:01:58 +00:00
Aldy Hernandez c9f9eb5d07 c-decl.c (finish_decl): Pass input_location to build_unary_op.
* c-decl.c (finish_decl): Pass input_location to build_unary_op.
	* c-typeck.c (array_to_pointer_conversion): Pass location to
	build_unary_op.
	(function_to_pointer_conversion): Use error_at and warning_at.
	(build_indirect_ref): Same.
	(build_array_ref): Pass location to build_binary_op.
	(parser_build_unary_op): Do not set location after calling
	build_unary_op.
	(build_unary_op): Add location argument.  Use it throughout.  Set
	EXPR_LOCATION before returning new tree.
	(build_modify_expr): Same.
	(build_binary_op): Use location throughout.  Set EXPR_LOCATION before
	returning node.
	* c-omp.c (c_finish_omp_atomic): Pass location to build_unary_op,
	build_indirect_ref, build_modify_expr.
	(c_finish_omp_for): Same.  Use error_at instead of error.
	* c-common.c (c_common_truthvalue_conversion): Pass location to
	build_unary_op.
	(warn_for_div_by_zero): Add location argument.
	* c-common.h: Add argument to build_modify_expr, build_indirect_ref,
	build_unary_op, warn_for_div_by_zero.
	* c-parser.c (c_parser_typeof_specifier): Use
	protected_set_expr_location.
	(c_parser_statement_after_labels): Same.
	(c_parser_condition): Same.
	(c_parser_expr_no_commas): Pass correct location to build_modify_expr.
	(c_parser_conditional_expression): Use protected_set_expr_location.
	(c_parser_unary_expression): Pass location to build_indirect_ref.
	(c_parser_postfix_expression_after_primary): Pass location to
	build_indirect_ref, build_unary_op.
	(c_parser_omp_for_loop): Set the increment expression's EXPR_LOCATION.
objc/
	* objc-act.c (objc_build_string_object): Pass location to
	build_unary_op.
	(init_def_list): Same.
	(init_objc_symtab): Same.
	(init_module_descriptor): Same.
	(build_module_initializer_routine): Same.
	(generate_static_references): Same.
	(build_typed_selector_reference): Same.
	(add_objc_string): Same.
	(objc_substitute_decl): Same.
	(objc_build_ivar_assignment): Same.
	(objc_build_global_assignment): Same.
	(objc_build_strong_cast_assignment): Same.
	(generate_protocols): Same.
	(build_protocol_initializer): Same.
	(build_dispatch_table_initializer): Same.
	(generate_protocol_list): Same.
	(build_category_initializer): Same.
	(build_shared_structure_initializer): Same.
	(generate_shared_structures): Same.
	(objc_build_protocol_expr): Same.
	(build_ivar_reference): Same.
	(get_super_receiver): Same.
	build_modify_expr.
testsuite/
	* gcc.dg/gomp/for-1.c: Test column.
	* gcc.dg/misc-column.c: Add column tests for unary arguments.
cp/
	* typeck.c (build_x_indirect_ref): Add location argument.
	(cp_build_binary_op): Pass location to warn_for_div_by_zero.
	(cp_build_unary_op): Add location argument.
	(cp_build_modify_expr): Same.
	* class.c (build_base_path): Pass location to build_indirect_ref.
	* semantics.c (handle_omp_for_class_iterator): Pass elocus to
	build_modify_expr.

From-SVN: r140914
2008-10-06 21:35:02 +00:00
Aldy Hernandez ba47d38d4c c-tree.h: Add argument to c_objc_common_truthvalue_conversion, parser_build_binary_op.
* c-tree.h: Add argument to c_objc_common_truthvalue_conversion,
        parser_build_binary_op.
        * c-decl.c (build_enumerator): Pass location to build_binary_op.
        * c-typeck.c (build_array_ref): Same.
        (parser_build_unary_op): New location argument.
        (pointer_diff): Pass location to build_binary_op,
        c_objc_common_truthvalue_conversion.
        (build_modify_expr): Same.
        (build_unary_op): New location argument.
        (build_binary_op): New location argument.
        (c_objc_common_truthvalue_conversion): Pass location to
        c_*common_truthvalue_conversion.
        * c-convert.c (convert): Same.
        * c-common.c (binary_op_error): New location argument.
        (pointer_int_sum): Pass location to build_binary_op.
        (c_common_truthvalue_conversion): New location argument.
        (warn_for_sign_compare): Same.
        * c-common.h: Add location argument to c_common_truthvalue_conversion,
        binary_op_error, build_binary_op, warn_for_sign_compare.
        * c-parser.c (c_parser_condition): Pass location to
        c_*common_truthvalue_conversion.
        (c_parser_conditional_expression): Save condition's location and pass
        it on down.
        (c_parser_binary_expression): Same, but for the binary operator's
        location.
        (c_parser_omp_for_loop): Pass location to
        c_objc_common_truthvalue_conversion.
objc/
        * objc-act.c (next_sjlj_build_enter_and_setjmp): Call
        c_common_truthvalue_conversion with location.
        (next_sjlj_build_catch_list): Same.
        (next_sjlj_build_try_catch_finally): Same.
testsuite/
        * gcc.dg/Walways-true-1.c: Test column numbers.
        * gcc.dg/c90-const-expr-5.c: Same.
        * gcc.dg/compare4.c: Same.
        * gcc.dg/Werror-1.c: Same.
cp/
        * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
        (get_member_function_from_ptrfunc): Same.
        (build_x_binary_op): Same.
        (build_binary_op): Same.
        (cp_build_binary_op): New location argument.
        (pointer_diff): Pass location to cp_build_binary_op.
        (cp_truthvalue_conversion): Pass location to build_binary_op.
        (convert_ptrmem): Pass location to cp_build_binary_op.
        (cp_build_modify_expr): Same.
        (build_ptrmemfunc): Same.
        * init.c (expand_cleanup_for_base): Pass location to
        c_common_truthvalue_conversion.
        (build_new_1): Pass location to cp_build_binary_op.
        (build_vec_delete_1): Pass location to *build_binary_op,
        c_common_truthvalue_conversion.
        (build_vec_init): Same.
        (build_delete): Same.
        * decl.c (compute_array_index_type): Same.
        * call.c (build_new_op): Same.
        * rtti.c (build_dynamic_cast_1): Same.
        * cp-tree.h: Add argument to cp_build_binary_op.
        * semantics.c (handle_omp_for_class_iterator): Pass location to
        *build_binary_op, c_common_truthvalue_conversion.
        * decl2.c (get_guard_cond): Same.

From-SVN: r140598
2008-09-23 14:55:14 +00:00
Andrew Pinski 2700cb8675 re PR objc/37460 (NeXT runtime ICEs)
2008-09-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * tree.c (get_callee_fndecl): Don't call the language hook.
        * langhooks.h (lang_hooks): Remove lang_get_callee_fndecl.
        * langhooks-def.h (LANG_HOOKS_GET_CALLEE_FNDECL): Kill.
        (LANG_HOOKS_INITIALIZER): Remove LANG_HOOKS_GET_CALLEE_FNDECL.


2008-09-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR objc/37460
        * objc-lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
        * objc-act.h (objc_get_callee_fndecl): Remove prototype.
        * objc-act.c (objc_get_callee_fndecl): Kill.

2008-09-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
        (java_get_callee_fndecl): Kill.

2008-09-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR objc/37460
        * objcp-lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.

From-SVN: r140430
2008-09-17 14:39:13 -07:00
Jan Hubicka 0494626aae re PR middle-end/18071 (-Winline does not respect -fno-default-inline)
PR c++/18071
	* tree.h (DECL_INLINE): remove.
	(DECL_DECLARED_INLINE_P): Update docs.
	(DECL_NO_INLINE_WARNING_P): new.
	(tree_function_decl): Replace inline_flag by no_inline_warning_flag.
	* tree-inline.c (inlinable_function_p): Set DECL_NO_INLINE_WARNING_P.

	Java:
	* class.c (add_method_1): Do not initialize DECL_INLINE.
	(make_local_function_alias): Likewise.
	* expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
	* lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.

	Objc:
	* objc/objc-act.c (objc_finish_method_definition): Do not set DECL_INLINE.
	
	C++:
	* cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.

From-SVN: r140418
2008-09-17 15:00:59 +00:00
Jakub Jelinek 719bb4e3d3 Convert ChangeLog files to UTF-8.
Command used:
LC_ALL=C sed -i \
  -e 's/D\(o\|\xf6\)nmez/D\xc3\xb6nmez/' \
  -e 's/\(Av\|\x81\xc1v\|\xc1v\|\xef\xbf\xbdv\?\|\x81\xc3\x81v\|\xc3v\)ila/\xc3\x81vila/' \
  -e 's/Esp\(in\|\x81\xedn\|\xedn\|\xef\xbf\xbdn\?\|\xef\xbf\xbd\xadn\|\x81\xc3\xadn\)dola/Esp\xc3\xadndola/' \
  -e 's/Schl\(u\|\xef\xbf\xbd\|\xfcu\?\|\x81\xfc\|\x81\xc3\xbc\|\xc3\xaf\xc2\xbf\xc2\xbd\|\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xc2\xbc\)ter/Schl\xc3\xbcter/' \
  -e 's/Humi\(e\|\xe8\)res/Humi\xc3\xa8res/' \
  -e 's/L\(ow\|\xc3\xaf\xc2\xbf\xc2\xbd\|oew\|\xf6w\)is/L\xc3\xb6wis/' \
  -e 's/G\xfctlein/G\xc3\xbctlein/' \
  -e 's/G\xe1[b]or/G\xc3\xa1bor/' \
  -e 's/L\xf3ki/L\xc3\xb3ki/' \
  -e 's/Fautr\xc3 /Fautr\xc3\xa9 /' \
  -e 's/S\xe9[b]astian/S\xc3\xa9bastian/' \
  -e 's/Th\xef\xbf\xbd[d]ore/Th\xc3\xa9odore/' \
  -e 's/Cors\xc3\xc2\xa9pius/Cors\xc3\xa9pius/' \
  -e 's/K\xfchl/K\xc3\xbchl/' \
  -e 's/R\xf6nnerup/R\xc3\xb6nnerup/' \
  -e 's/L\xf8vset/L\xc3\xb8vset/' \
  -e 's/Ph\x81\xfb\x81\xf4ng-Th\x81\xe5o/Ph\xc3\xbb\xc3\xb4ng-Th\xc3\xa5o/' \
  -e 's/V\x81\xf5/V\xc3\xb5/' \
  -e 's/J\xf6nsson/J\xc3\xb6nsson/' \
  -e 's/V\xef\xbf\xbdis\xef\xbf\xbdnen/V\xc3\xa4is\xc3\xa4nen/' \
  -e 's/J\xef\xbf\xbdrg/J\xc3\xb6rg/' \
  -e 's/M\xef\xbf\xbdsli/M\xc3\xb6sli/' \
  -e 's/R\xe4ty/R\xc3\xa4ty/' \
  -e 's/2003\xc2\xad-/2003-/' \
  -e 's/\xc2\xa0/ /g' \
  -e 's/ \xa0/  /g' \
  -e 's/\xa0 //' \
  `find . -name \*ChangeLog\* | grep -v /.svn`

From-SVN: r140033
2008-09-05 13:07:45 +02:00
Aldy Hernandez 6a3799eb00 tree.c (protected_set_expr_location): New.
* tree.c (protected_set_expr_location): New.
        * tree.h (protected_set_expr_location): New prototype.
        * c-tree.h (build_array_ref): Add argument.
        (parser_build_unary_op): Same.
        * c-typeck.c (build_indirect_ref): Handle new location argument.
        (build_array_ref): Same.
        (parser_build_unary_op): Same.
        * gimplify.c (gimplify_asm_expr): Set input_location before calling
        error.
        * c-omp.c (c_finish_omp_atomic): Pass location when calling
        build_indirect_ref.
        * c-common.c (finish_label_address_expr): Handle new location
        argument.
        * c-common.h (build_indirect_ref): Add argument.
        (finish_label_address_expr): Same.
        * c-parser.c (c_parser_unary_expression): Pass location to build
        functions.
        (c_parser_postfix_expression): Same.
objc/
        * objc-act.c (build_typed_selector_reference): Pass input_location to
        build_unary_op calls.
        (build_selector_reference): Same, but to build_array_ref.
        (objc_substitute_decl): Same.
        (build_ivar_reference): Same, but to build_indirect_ref.
        (get_super_receiver): Same.
testsuite/
        * gcc.dg/20010516-1.c: Test for columns.
cp/
        * typeck.c (build_x_indirect_ref): Add location argument.
        * class.c (build_base_path): Pass location to build_indirect_ref.
        * pt.c (tsubst_copy_and_build): Pass location to
        finish_label_address_expr.
        * parser.c (cp_parser_unary_expression): Same.

From-SVN: r139867
2008-09-01 15:02:27 +00:00
Richard Biener 726a989a8b backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch.
2008-07-28  Richard Guenther  <rguenther@suse.de>

	Merge from gimple-tuples-branch.

	* ChangeLog.tuples: ChangeLog from gimple-tuples-branch.
	* gimple.def: New file.
	* gsstruct.def: Likewise.
	* gimple-iterator.c: Likewise.
	* gimple-pretty-print.c: Likewise.
	* tree-gimple.c: Removed.  Merged into ...
	* gimple.c: ... here.  New file.
	* tree-gimple.h: Removed.  Merged into ...
	* gimple.h: ... here.  New file.

	* Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h.
	* configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the
	--enable-checking=gimple flag.
	* config.in: Likewise.
	* configure: Regenerated.

	* tree-ssa-operands.h: Tuplified.
	* tree-vrp.c: Likewise.
	* tree-loop-linear.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-dump.c: Likewise.
	* tree-complex.c: Likewise.
	* cgraphbuild.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tracer.c: Likewise.
	* gengtype.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-ssa-loop-unswitch.c: Likewise.
	* cgraph.c: Likewise.
	* cgraph.h: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* value-prof.c: Likewise.
	* tree-ssa-loop-ch.c: Likewise.
	* tree-tailcall.c: Likewise.
	* value-prof.h: Likewise.
	* tree.c: Likewise.
	* tree.h: Likewise.
	* tree-pass.h: Likewise.
	* ipa-cp.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-scalar-evolution.h: Likewise.
	* target.h: Likewise.
	* lambda-mat.c: Likewise.
	* tree-phinodes.c: Likewise.
	* diagnostic.h: Likewise.
	* builtins.c: Likewise.
	* tree-ssa-alias-warnings.c: Likewise.
	* cfghooks.c: Likewise.
	* fold-const.c: Likewise.
	* cfghooks.h: Likewise.
	* omp-low.c: Likewise.
	* tree-ssa-dse.c: Likewise.
	* ipa-reference.c: Likewise.
	* tree-ssa-uncprop.c: Likewise.
	* toplev.c: Likewise.
	* tree-gimple.c: Likewise.
	* tree-gimple.h: Likewise.
	* tree-chrec.c: Likewise.
	* tree-chrec.h: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-sccvn.h: Likewise.
	* cgraphunit.c: Likewise.
	* tree-ssa-copyrename.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-nomudflap.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* c-format.c: Likewise.
	* tree-stdarg.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-nrv.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* ipa-utils.c: Likewise.
	* tree-ssa-propagate.h: Likewise.
	* tree-ssa-alias.c: Likewise.
	* gimple-low.c: Likewise.
	* tree-ssa-sink.c: Likewise.
	* ipa-inline.c: Likewise.
	* c-semantics.c: Likewise.
	* dwarf2out.c: Likewise.
	* expr.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* predict.c: Likewise.
	* tree-ssa-loop.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-ifcombine.c: Likewise.
	* matrix-reorg.c: Likewise.
	* c-decl.c: Likewise.
	* tree-eh.c: Likewise.
	* c-pretty-print.c: Likewise.
	* lambda-trans.c: Likewise.
	* function.c: Likewise.
	* langhooks.c: Likewise.
	* ebitmap.h: Likewise.
	* tree-vectorizer.c: Likewise.
	* function.h: Likewise.
	* langhooks.h: Likewise.
	* tree-vectorizer.h: Likewise.
	* ipa-type-escape.c: Likewise.
	* ipa-type-escape.h: Likewise.
	* domwalk.c: Likewise.
	* tree-if-conv.c: Likewise.
	* profile.c: Likewise.
	* domwalk.h: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-data-ref.h: Likewise.
	* tree-flow-inline.h: Likewise.
	* tree-affine.c: Likewise.
	* tree-vect-analyze.c: Likewise.
	* c-typeck.c: Likewise.
	* gimplify.c: Likewise.
	* coretypes.h: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* calls.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree.def: Likewise.
	* tree-dfa.c: Likewise.
	* except.c: Likewise.
	* except.h: Likewise.
	* cfgexpand.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-live.h: Likewise.
	* tree-predcom.c: Likewise.
	* lambda.h: Likewise.
	* tree-mudflap.c: Likewise.
	* ipa-prop.c: Likewise.
	* print-tree.c: Likewise.
	* tree-ssa-copy.c: Likewise.
	* ipa-prop.h: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* ggc-page.c: Likewise.
	* c-omp.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-ssa-ter.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-ssa.c: Likewise.
	* lambda-code.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-inline.h: Likewise.
	* tree-iterator.c: Likewise.
	* tree-optimize.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-vect-transform.c: Likewise.
	* tree-object-size.c: Likewise.
	* tree-outof-ssa.c: Likewise.
	* cfgloop.c: Likewise.
	* system.h: Likewise.
	* tree-profile.c: Likewise.
	* cfgloop.h: Likewise.
	* c-gimplify.c: Likewise.
	* c-common.c: Likewise.
	* tree-vect-generic.c: Likewise.
	* tree-flow.h: Likewise.
	* c-common.h: Likewise.
	* basic-block.h: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-ssa-structalias.h: Likewise.
	* tree-cfg.c: Likewise.
	* passes.c: Likewise.
	* ipa-struct-reorg.c: Likewise.
	* ipa-struct-reorg.h: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* cfgrtl.c: Likewise.
	* varpool.c: Likewise.
	* stmt.c: Likewise.
	* tree-ssanames.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* langhooks-def.h: Likewise.
	* tree-ssa-operands.c: Likewise.
	* config/alpha/alpha.c: Likewise.
	* config/frv/frv.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/m32c/m32c.c: Likewise.
	* config/m32c/m32c-protos.h: Likewise.
	* config/spu/spu.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/pa/pa.c: Likewise.
	* config/mips/mips.c: Likewise.

From-SVN: r138207
2008-07-28 14:33:56 +00:00
Ralf Wildenhues 39a13be5cb objc-act.c: Fix comment typos.
gcc/objc/

	* objc-act.c: Fix comment typos.

gcc/cp/

	* call.c: Fix comment typos.
	* class.c: Likewise.
	* cp-tree.h: Likewise.
	* cxx-pretty-print.c: Likewise.
	* decl.c: Likewise.
	* init.c: Likewise.
	* name-lookup.c: Likewise.
	* operators.def: Likewise.
	* parser.c: Likewise.
	* pt.c: Likewise.
	* tree.c: Likewise.
	* typeck.c: Likewise.

From-SVN: r138042
2008-07-21 19:29:07 +00:00
Kaveh R. Ghazi 5025f3793e objc-act.c (objc_start_class_interface, [...]): Avoid C++ keywords.
* objc-act.c (objc_start_class_interface,
	objc_start_category_interface, objc_start_class_implementation,
	objc_start_category_implementation, objc_build_struct,
	generate_static_references, build_private_template,
	lookup_category, objc_add_method, add_category,
	add_instance_variable, objc_is_public, conforms_to_protocol,
	start_class, continue_class, finish_class): Avoid C++ keywords.

From-SVN: r137958
2008-07-18 17:16:25 +00:00
Jason Merrill 7ce841d2c8 re PR objc++/36723 (massive obj-c++ failures at rev.137407)
PR objc++/36723
        * objc/objc-act.c (objc_build_constructor): Update C++ tweak.
        * cp/lex.c (init_reswords): Always set D_OBJC.

From-SVN: r137813
2008-07-15 01:11:18 -04:00
Rafael Avila de Espindola df0ed6c5a3 objc-act.c (synth_module_prologue): Use TREE_NO_WARNING instead of DECL_IN_SYSTEM_HEADER.
2007-07-14  Rafael Avila de Espindola  <espindola@google.com>

	* objc-act.c (synth_module_prologue): Use TREE_NO_WARNING instead
	of DECL_IN_SYSTEM_HEADER.

2007-07-14  Rafael Avila de Espindola  <espindola@google.com>

	* c-decl.c (diagnose_mismatched_decls): Don't warn if TREE_NO_WARNING
	is set.

From-SVN: r137802
2008-07-14 21:41:27 +00:00
Ian Lance Taylor eea1139b26 c-common.h (enum rid): Add RID_CXX_COMPAT_WARN.
./:	* c-common.h (enum rid): Add RID_CXX_COMPAT_WARN.
	(struct c_common_resword): Define.
	(D_CONLY, D_CXXONLY, D_C99, D_CXX0X, D_EXT, D_EXT89): Define.
	(D_ASM, D_OBJC, D_CXX_OBJC, D_CXXWARN): Define.
	(c_common_reswords, num_c_common_reswords): Declare.
	* c-common.c (c_common_reswords): New global const array.
	(num_c_common_reswords): New const int.
	* c-parser.c (struct resword, reswords): Don't define.
	(D_C89, D_EXT, D_EXT89, D_OBJC): Don't define.
	(c_parse_init): Clarify mask code.  Use c_common_reswords rather
	than reswords.  If warning about C++ keywords, give them a special
	RID code.
	(c_lex_one_token): Warn about C++ keywords.  Call
	objc_is_reserved_word rather than OBJC_IS_AT_KEYWORD.
	(c_parser_external_declaration): Look for RID_xxx rather than
	RID_AT_xxx, for ObjC++ keywords which are also C++ keywords.
	(c_parser_statement_after_labels): Likewise.
	(c_parser_objc_class_instance_variables): Likewise.
	(c_parser_objc_class_declaration): Likewise.
	(c_parser_objc_try_catch_statement): Likewise.
	* c-decl.c (c_print_identifier): Ignore RID_CXX_COMPAT_WARN.
	(declspecs_add_type): Likewise.
cp/:
	* lex.c (struct resword, reswords): Don't define.
	(D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
	(init_reswords): Clarify mask code.  Use c_common_reswords rather
	than reswords.
objc/:
	* objc-act.c (objc_is_reserved_word): Always check for RID_CLASS,
	etc., not just when OBJCPLUS is defined.
testsuite/:
	* gcc.dg/Wcxx-compat-2.c: New test.

From-SVN: r137724
2008-07-11 18:16:26 +00:00
Ian Lance Taylor c0ed0531e5 tree.h (enum tree_code): Include all-tree.def, not tree.def.
* tree.h (enum tree_code): Include all-tree.def, not tree.def.
	Define END_OF_BASE_TREE_CODES around inclusion.
	* tree.c (tree_code_type): New global array.
	(tree_code_length, tree_code_name): Likewise.
	* Makefile.in (TREE_H): Add all-tree.def, c-common.def, and
	$(lang_tree_files).
	(all-tree.def, s-alltree): New targets.
	(gencheck.h, s-gencheck): Remove.
	(tree.o): Depend upon all-tree.def.
	(build/gencheck.o): Remove gencheck.h dependency.
	(mostlyclean): Don't remove gencheck.h.
	* c-common.h (enum c_tree_code): Remove.
	* c-lang.c (tree_code_type): Remove.
	(tree_code_length, tree_code_name): Remove.
	* gencheck.c (tree_codes): Include all-tree.def, rather than
	tree.def, c-common.def, and gencheck.h.  Undefined DEFTREECODE
	after it is used.
	* tree-browser.c (tb_tree_codes): Include all-tree.def, rather
	than tree.def.
	* cp/cp-tree.h (enum cplus_tree_code): Remove.
	(operator_name_info): Size to MAX_TREE_CODES.
	(assignment_operator_name_info): Likewise.
	* cp/cp-lang.c (tree_code_type): Remove.
	(tree_code_length, tree_code_name): Remove.
	* cp/lex.c (operator_name_info): Size to MAX_TREE_CODES.
	(assignment_operator_name_info): Likewise.
	* cp/decl.c (grok_op_properties): Change LAST_CPLUS_TREE_CODE to
	MAX_TREE_CODES.
	* cp/mangle.c (write_expression): Likewise.
	* cp/Make-lang.in (CXX_TREE_H): Remove cp/cp-tree.def.
	* fortran/f95-lang.c (tree_code_type): Remove.
	(tree_code_length, tree_code_name): Remove.
	* java/java-tree.h (enum java_tree_code): Remove.
	* java/lang.c (tree_code_type): Remove.
	(tree_code_length, tree_code_name): Remove.
	* java/Make-lang.in (JAVA_TREE_H): Remove java/java-tree.def.
	* objc/objc-act.h (enum objc_tree_code): Remove.
	* objc/objc-lang.c (tree_code_type): Remove.
	(tree_code_length, tree_code_name): Remove.
	* objcp/objcp-lang.c (tree_code_type): Remove.
	(tree_code_length, tree_code_name): Remove.
	* ada/ada-tree.h (enum gnat_tree_code): Remove.
	* ada/Make-lang.in (ADA_TREE_H): Remove ada/ada-tre.def.
	* ada/misc.c (tree_code_type): Remove.
	(tree_code_length, tree_code_name): Remove.

From-SVN: r137006
2008-06-21 21:17:40 +00:00
Kaveh R. Ghazi e1e4cdc42c collect2.c (main, [...]): Fix for -Wc++-compat.
* collect2.c (main, add_to_list): Fix for -Wc++-compat.
	* gcc.c (translate_options, init_spec, store_arg, read_specs,
	add_to_obstack, file_at_path, find_a_file, execute,
	add_preprocessor_option, add_assembler_option, add_linker_option,
	process_command, insert_wrapper, do_option_spec, do_self_spec,
	spec_path, do_spec_1, is_directory, main, used_arg,
	getenv_spec_function): Likewise.
	* tlink.c (symbol_hash_lookup, file_hash_lookup,
	demangled_hash_lookup, symbol_push, file_push, frob_extension):
	Likewise.
	
java:
	* class.c (ident_subst, mangled_classname, unmangle_classname,
	gen_indirect_dispatch_tables, add_method_1,
	build_fieldref_cache_entry, make_local_function_alias,
	layout_class, java_treetreehash_find, java_treetreehash_new,
	split_qualified_name): Fix for -Wc++-compat.
	* constants.c (set_constant_entry, cpool_for_class): Likewise.
	* decl.c (make_binding_level, java_dup_lang_specific_decl,
	start_java_method): Likewise.
	* except.c (prepare_eh_table_type): Likewise.
	* expr.c (type_assertion_hash, note_instructions): Likewise.
	* java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
	MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
	* jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
	Likewise.
	* jcf-parse.c (reverse, java_read_sourcefilenames,
	annotation_grow, rewrite_reflection_indexes, java_parse_file,
	process_zip_dir): Likewise.
	* jcf-path.c (add_entry, add_path, jcf_path_init,
	jcf_path_extdirs_arg): Likewise.
	* jcf-reader.c (jcf_parse_constant_pool): Likewise.
	* jvgenmain.c (do_mangle_classname): Likewise.
	* lang.c (put_decl_string): Likewise.
	* verify-impl.c (make_state_copy, make_state, add_new_state):
	Likewise.

objc:
	* objc-act.c (setup_string_decl, objc_build_string_object,
	hash_interface, eq_interface, objc_begin_try_stmt,
	encode_method_prototype, build_ivar_list_initializer,
	objc_build_encode_expr): Fix for -Wc++-compat.

From-SVN: r136980
2008-06-20 03:46:09 +00:00
Tomas Bily dbd368da83 objc-act.c (objc_generate_write_barrier, [...]): Use CONVERT_EXPR_P.
* objc-act.c (objc_generate_write_barrier,
        objc_finish_message_expr): Use CONVERT_EXPR_P.

From-SVN: r135212
2008-05-12 15:08:27 +02:00
Paolo Bonzini 51eed2800d tree-cfg.c (verify_expr): Check with is_gimple_address.
2008-04-23  Paolo Bonzini  <bonzini@gnu.org>

	* tree-cfg.c (verify_expr): Check with is_gimple_address.  Don't
	check TREE_INVARIANT.
	* tree-gimple.c (is_gimple_address): New.
	(is_gimple_invariant_address): Simplify using decl_address_invariant_p.
	* tree-gimple.h (is_gimple_address): New.
	* tree.h (decl_address_invariant_p): New.
	* tree.c (make_node_stat): Don't set TREE_INVARIANT.
	(build_string): Likewise.
	(decl_address_invariant_p): New, from is_gimple_invariant_address.
	(tree_invariant_p_1): Likewise.
	(save_expr): Use it.
	(tree_invariant_p): New.
	(skip_simple_arithmetic): Use it.
	(stabilize_reference_1): Use it.
	(recompute_tree_invariant_for_addr_expr): Don't update TREE_INVARIANT,
	simplify.
	(build1_stat): Drop code to compute TREE_INVARIANT.
	(build2_stat): Drop code to compute TREE_INVARIANT.
	(build3_stat): Drop code to compute TREE_INVARIANT.
	(build4_stat): Drop code to compute TREE_INVARIANT.
	(build5_stat): Drop code to compute TREE_INVARIANT.
	(build7_stat): Drop code to compute TREE_INVARIANT.
	(merge_dllimport_decl_attributes): Don't mention TREE_INVARIANT.
	* tree.h (struct tree_base): Remove invariant_flag.
	(TREE_INVARIANT): Remove.
	* builtins.c (build_string_literal): Don't set TREE_INVARIANT.
	(fold_builtin_expect): Check TREE_CONSTANT.
	* tree-ssa-ccp.c (fold_stmt_r): Adjust comment.
	* c-tree.h (c_expr_to_decl): Drop third parameter.
	* c-typeck.c (build_external_ref): Don't set TREE_INVARIANT.
	(build_c_cast): Don't set TREE_INVARIANT.
	(pop_init_level): Don't set TREE_INVARIANT.
	(c_objc_common_truthvalue_conversion): Don't set TREE_INVARIANT.
	* gimplify.c (gimplify_init_ctor_preeval): Add assertion, test
	TREE_CONSTANT.
	(gimplify_init_constructor): Don't set TREE_INVARIANT.
	(gimplify_addr_expr): Adjust comment.
	* tree-mudflap.c (mf_build_string):
	* print-tree.c (print_node): Don't print TREE_INVARIANT.
	* tree-nested.c (convert_nonlocal_reference): Adjust comment.
	* c-common.c (fix_string_type): Don't set TREE_INVARIANT.
	* langhooks-def.h (lhd_expr_to_decl): Drop third parameter.
	* langhooks.c (lhd_expr_to_decl): Drop third parameter.
	* langhooks.h (struct lang_hooks): Drop third parameter from
	expr_to_decl.

java:
2008-04-23  Paolo Bonzini  <bonzini@gnu.org>

	* class.c (build_utf8_ref): Don't set TREE_INVARIANT.
	(build_classdollar_field): Don't set TREE_INVARIANT.
	(get_dispatch_table): Don't set TREE_INVARIANT.
	(make_class_data): Don't set TREE_INVARIANT.
	(build_symbol_entry): Don't set TREE_INVARIANT.
	(emit_symbol_table): Don't set TREE_INVARIANT.
	* constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
	(build_ref_from_constant_pool): Don't set TREE_INVARIANT.
	* resource.c (compile_resource_data): Don't set TREE_INVARIANT.
	* expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.

objc:
2008-04-23  Paolo Bonzini  <bonzini@gnu.org>

	* objc-act.c (objc_build_string_object): Don't set TREE_INVARIANT.

cp:
2008-04-23  Paolo Bonzini  <bonzini@gnu.org>

	* typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
	(build_ptrmemfunc1): Don't set TREE_INVARIANT.
	* init.c (build_zero_init): Don't set TREE_INVARIANT.
	* class.c (build_base_path): Don't set TREE_INVARIANT.
	(build_vtbl_ref_1): Don't set TREE_INVARIANT.
	(build_vtbl_initializer): Don't set TREE_INVARIANT.
	* decl.c (build_enumerator): Don't set TREE_INVARIANT.
	* rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
	(generic_initializer): Don't set TREE_INVARIANT.
	(ptr_initializer): Don't set TREE_INVARIANT.
	(ptm_initializer): Don't set TREE_INVARIANT.
	(class_initializer): Don't set TREE_INVARIANT.
	* typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
	* pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
	(build_template_parm_index): Don't set TREE_INVARIANT.
	(reduce_template_parm_level): Don't set TREE_INVARIANT.
	(process_template_parm): Don't set TREE_INVARIANT.

ada:
2008-04-23  Paolo Bonzini  <bonzini@gnu.org>

	* trans.c (Attribute_to_gnu): Don't set TREE_INVARIANT.
	(call_to_gnu): Don't set TREE_INVARIANT.
	* utils2.c (gnat_build_constructor): Don't set TREE_INVARIANT.

fortran:
2008-04-23  Paolo Bonzini  <bonzini@gnu.org>

	* trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
	* trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
	(gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
	(gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
	(gfc_conv_array_initializer): Don't set TREE_INVARIANT.
	* trans-common.c (get_init_field): Don't set TREE_INVARIANT.
	(create_common): Don't set TREE_INVARIANT.
	* trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
	* trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.

From-SVN: r134599
2008-04-23 15:00:52 +00:00
Tom Tromey 6cba282a2c t-uclinux (generated_files): Add sysroot-suffix.h.
gcc/
2008-04-03  Tom Tromey  <tromey@redhat.com>
	    Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* config/m68k/t-uclinux (generated_files): Add sysroot-suffix.h.
	* config/bfin/t-bfin-linux (generated_files): Add
	linux-sysroot-suffix.h.
	* doc/install.texi (Prerequisites): Require make 3.80.
	* doc/sourcebuild.texi (Front End Directory): Document new
	variable.
	* Makefile.in (generated_files): New variable.
	(ALL_HOST_OBJS): New variable.
	($(ALL_HOST_OBJS)): New target.

gcc/java/
2008-04-03  Tom Tromey  <tromey@redhat.com>

	* Make-lang.in (java_OBJS): New variable.

gcc/objc/
2008-04-03  Tom Tromey  <tromey@redhat.com>

	* Make-lang.in (objc_OBJS): New variable.

gcc/objcp/
2008-04-03  Tom Tromey  <tromey@redhat.com>

	* Make-lang.in (obj-c++_OBJS): New variable.

gcc/cp/
2008-04-03  Tom Tromey  <tromey@redhat.com>

	* Make-lang.in (c++_OBJS): New variable.

gcc/fortran/
2008-04-03  Tom Tromey  <tromey@redhat.com>

	* Make-lang.in (fortran_OBJS): New variable.

Co-Authored-By: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>

From-SVN: r133862
2008-04-03 06:12:27 +00:00
Tom Tromey e980df8e7f sourcebuild.texi, [...]: Revert automatic dependency patch.
gcc/
	* doc/sourcebuild.texi, doc/install.texi, configure, aclocal.m4,
	configure.ac, Makefile.in, config/t-darwin, config/m32c/t-m32c,
	config/spu/t-spu-elf, config/i386/t-interix,
	config/i386/t-cygming, config/i386/x-i386, config/i386/t-cygwin,
	config/i386/x-darwin, config/i386/x-mingw32,
	config/i386/t-netware, config/i386/x-cygwin, config/i386/t-nwld,
	config/sh/t-sh, config/sh/t-symbian, config/x-linux,
	config/t-sol2, config/x-hpux, config/x-darwin, config/ia64/t-ia64,
	config/x-solaris, config/t-vxworks, config/m68k/t-uclinux,
	config/rs6000/x-rs6000, config/rs6000/x-darwin64,
	config/rs6000/x-darwin, config/rs6000/t-rs6000,
	config/score/t-score-elf, config/arm/t-strongarm-pe,
	config/arm/t-pe, config/arm/t-arm, config/arm/t-wince-pe,
	config/v850/t-v850, config/v850/t-v850e, config/bfin/t-bfin-linux:
	Revert automatic dependency patch.
gcc/java/
	* Make-lang.in: Revert automatic dependency patch.
gcc/objc/
	* Make-lang.in: Revert automatic dependency patch.
gcc/objcp/
	* Make-lang.in: Revert automatic dependency patch.
gcc/cp/
	* Make-lang.in: Revert automatic dependency patch.
gcc/fortran/
	* Make-lang.in: Revert automatic dependency patch.

From-SVN: r133652
2008-03-27 19:20:18 +00:00
Douglas Gregor 525521b6dd re PR bootstrap/35704 (Bootstrap failure on i686-apple-darwin9 at revision 133519 (take 2).)
2008-03-27  Douglas Gregor  <doug.gregor@gmail.com>

	PR obj-c++/35704
	* typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
	(build_compound_expr): New, for compatibility with C
	build_compound_expr.
	(cp_build_compound_expr): Renamed from build_compound_expr.
	(build_c_cast): New, for compatibility with C build_c_cast.
	(cp_build_c_cast): Renamed from build_c_cast.
	* init.c (build_vec_delete_1): Fix calls to build_compound_expr.
	* decl.c (cxx_maybe_build_cleanup): Ditto.
	* cp-tree.h (build_compound_expr): Add C-compatibile prototype.
	(cp_build_compound_expr): Renamed from build_compound_expr.
	(build_c_cast): Add C-compatible prototype.
	(cp_build_c_cast): Renamed from build_c_cast.
	* typeck2.c (build_functional_cast): Use cp_build_c_cast.
	* parser.c (cp_parser_cast_expression): Fix call to build_c_cast.

2008-03-27  Douglas Gregor  <doug.gregor@gmail.com>

	PR obj-c++/35704	
	* objc-act.c (objc_build_component_ref): Fix call to
	finish_class_member_access_expr.
	(objc_generate_cxx_ctor_or_dtor): Fix call to
	build_special_member_call.

From-SVN: r133643
2008-03-27 14:53:57 +00:00
Andrew Pinski 9c349a39eb re PR objc/29197 (ICE after error with array type with undefined variable)
2008-03-25  Andrew Pinski  <pinskia@gmail.com>

        PR objc/29197
        * objc-act.c (encode_type): Handle when type is error_mark_node.
        (objc_push_parm): Handle when the type of parm is error_mark_node.

2008-03-25  Andrew Pinski  <pinskia@gmail.com>

        PR objc/29197
        * objc.dg/method-20.m: New testcase.

From-SVN: r133540
2008-03-25 20:19:58 -07:00
Tom Tromey 2fe3178b69 x-solaris (host-solaris.o): Update.
gcc
	* config/x-solaris (host-solaris.o): Update.
	* config/x-linux (host-linux.o): Update.
	* config/x-hpux (host-hpux.o): Update.
	* config/x-darwin (host-darwin.o): Update.
	* config/v850/t-v850e (v850-c.o): Update.
	* config/v850/t-v850 (v850-c.o): Update.
	* config/t-vxworks (vxworks.o): Update.
	* config/t-sol2 (sol2-c.o, sol2.o): Update.
	* config/t-darwin (darwin.o, darwin-c.o, darwin-driver.o):
	Update.
	* config/spu/t-spu-elf (spu-c.o): Update.
	(spu.o): Remove.
	* config/sh/t-symbian (sh-c.o): Update.
	(symbian.o): Update.
	* config/sh/t-sh (sh-c.o): Update.
	* config/score/t-score-elf (score7.o, score3.o): Update.
	* config/rs6000/x-rs6000 (driver-rs6000.o): Update.
	* config/rs6000/x-darwin64 (host-ppc64-darwin.o): Update.
	* config/rs6000/x-darwin (host-ppc-darwin.o): Update.
	* config/rs6000/t-rs6000 (rs6000-c.o): Update.
	(rs6000.o): Remove.
	* config/m68k/t-uclinux (generated_files): Add sysroot-suffix.h.
	* config/m32c/t-m32c (m32c-pragma.o): Update.
	* config/ia64/t-ia64 (ia64-c.o): Update.
	* config/i386/x-mingw32 (host-mingw32.o): Update.
	* config/i386/x-i386 (driver-i386.o): Update.
	* config/i386/x-darwin (host-i386-darwin.o): Update.
	* config/i386/x-cygwin (host-cygwin.o): Update.
	* config/i386/t-nwld (nwld.o): Update.
	* config/i386/t-netware (netware.o): Update.
	* config/i386/t-interix (winnt.o): Update.
	* config/i386/t-cygwin (cygwin1.o, cygwin2.o): Update.
	* config/i386/t-cygming (winnt.o, winnt-cxx.o, winnt-stubs.o,
	msformat-c.o): Update.
	* config/bfin/t-bfin-linux (generated_files): Add
	linux-sysroot-suffix.h.
	* config/arm/t-wince-pe (pe.o): Update.
	* config/arm/t-strongarm-pe (pe.o): Update.
	* config/arm/t-pe (pe.o): Update.
	* config/arm/t-arm (arm-c.o): Update.
	* doc/install.texi (Prerequisites): Require make 3.80.
	* Makefile.in: Remove .o targets.
	(CCDEPMODE, DEPDIR, depcomp, BUILD_DEPMODE): New variables.
	(OBSTACK_H, FIBHEAP_H, PARTITION_H, MD5_H, BCONFIG_H): Remove.
	(simple_generated_h, simple_generated_c): Move earlier.
	(generated_files): New variable.
	(TARGET_H, MACHMODE_H, HOOKS_H, HOSTHOOKS_DEF_H, LANGHOOKS_DEF_H,
	TARGET_DEF_H, RTL_BASE_H, RTL_H, PARAMS_H, BUILTINS_DEF, TREE_H,
	BASIC_BLOCK_H, GCOV_IO_H, COVERAGE_H, DEMANGLE_H, RECOG_H,
	ALIAS_H, EMIT_RTL_H, FLAGS_H, FUNCTION_H, EXPR_H, OPTABS_H,
	REGS_H, RA_H, RESOURCE_H, SCHED_INT_H, INTEGRATE_H, CFGLAYOUT_H,
	CFGLOOP_H, IPA_UTILS_H, IPA_REFERENCE_H, IPA_TYPE_ESCAPE_H,
	CGRAPH_H, DF_H, RESOURCE_H, DDG_H, GCC_H, GGC_H, TIMEVAR_H,
	INSN_ATTR_H, C_COMMON_H, C_PRAGMA_H, C_TREE_H, SYSTEM_H,
	PREDICT_H, DECNUM_H, MKDEPS_H, SYMTAB_H, TREE_DUMP_H,
	TREE_GIMPLE_H, TREE_FLOW_H, TREE_SSA_LIVE_H, PRETTY_PRINT_H,
	DIAGNOSTIC_H, C_PRETTY_PRINT_H, SCEV_H, LAMBDA_H, TREE_DATA_REF_H,
	VARRAY_H, TREE_INLINE_H, REAL_H, DBGCNT_H, EBIMAP_H): Remove.
	(.c.o): Remove.
	(COMPILE.base, COMPILE): New variables.
	(%.o): New pattern rule.
	(ALL_HOST_OBJS): New variable.
	(xgcc$(exeext), cpp$(exeext)): Remove extra version.o.
	(dummy-checksum.o, cc1-checksum.o): Remove.
	(DRIVER_SHLIB): New variable.
	(DRIVER_DEFINES): Use it.
	(gencondmd.c): Move out of build/.
	(s-conditions): Update.
	(BUILDCOMPILE.base, BUILDCOMPILE): New variables.
	(ALL_BUILD_OBJS): Likewise.
	(build/%.o): Use BUILDCOMPILE.
	(build/ggc-none.o, build/ggc-none.o, build/min-insn-modes.o,
	build/print-rtl.o, build/read-rtl.o, build/rtl.o, build/vec.o,
	build/gencondmd.o, build/genattrtab.o, build/genautomata.o,
	build/gencheck.o, build/gencodes.o, build/genconditions.o,
	build/genconfig.o, build/genconstants.o, build/genemit.o,
	build/genextract.o, build/genflags.o, build/genmddeps.o,
	build/genopinit.o, build/genoutput.o, build/genpeep.o,
	build/genpreds.o, build/genrecog.o, build/gcov-iov.o,
	build/gen-protos.o, build/scan.o, build/fix-header.o,
	build/scan-decls.o): Simplify.
	(collect2.o, c-opts.o, gcc.o, gccspec.o, gcc-options.o,
	cppdefault.o, protoize.o, unprotoize.o, intl.o, version.o,
	prefix.o, toplev.o): Reduce to variable setting.
	(libbackend.o): Use COMPILE.  Remove most dependencies.  Move
	later.
	($(out_object_file), gcc-options.o): New targets.
	($(ALL_HOST_OBJS)): New target.
	Include dependency files.
	* configure: Rebuilt.
	* configure.ac: Call ZW_CREATE_DEPDIR,
	ZW_PROG_COMPILER_DEPENDENCIES.
	* doc/sourcebuild.texi (Front End Directory): Document new
	variable.
gcc/java
	* Make-lang.in: Removed most explicit .o targets.
	(java/jvspec.o): Reduce to variable setting.  Moved to java/.
	($(GCJ)$(exeext)): Update.
	(JAVA_OBJS): New variable.
	(JCFDUMP_OBJS): Reformat.
	(java_OBJS): New variable.
	(java/jvspec.o-warn): Update.
	(java/parse.o-warn): Remove.
	(JAVA_TREE_H): Remove.
	(java/jcf-io.o): Reduce to variable setting.
	(ALL_CPPFLAGS): Likewise.
gcc/objc
	* Make-lang.in (objc_OBJS): New variable.
	(cc1obj-checksum.o, objc/objc-lang.o, objc/objc-act.o): Remove.
gcc/objcp
	* Make-lang.in (objcp_OBJS): New variable.
	(cc1objplus-checksum.o, objcp/objcp-lang.o, objcp/objcp-decl.o,
	objcp/objcp-act.o): Remove.
gcc/cp
	* Make-lang.in: Remove .o targets.
	(cp/g++spec.o): Moved to cp/.  Reduce to variable setting.
	(GXX_OBJS): Update.
	(c++_OBJS): New variable.
	(CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
gcc/fortran
	* Make-lang.in: Remove .o targets.
	(fortran_OBJS): New variable.
	(fortran/gfortranspec.o): Move to fortran/.  Reduce to variable
	setting.
	(GFORTRAN_D_OBJS): Update.
	(GFORTRAN_TRANS_DEPS): Remove.

From-SVN: r133523
2008-03-25 16:56:50 +00:00
Andreas Tobler f03f16b2b3 re PR bootstrap/35660 (Bootstrap failure on i686-apple-darwin9 at revision 133434.)
2008-03-21  Andreas Tobler  <a.tobler@schweiz.org>

	PR bootstrap/35660
	* objc-act.c (objc_generate_cxx_ctor_or_dtor): Rename IS_AGGR_TYPE to
	MAYBE_CLASS_TYPE_P.
	(objc_generate_cxx_cdtors): Likewise.
	(add_instance_variable): Likewise.

From-SVN: r133436
2008-03-21 21:49:25 +01:00
Tom Tromey 2d593c86cf system.h (USE_MAPPED_LOCATION): Poison.
gcc
	* system.h (USE_MAPPED_LOCATION): Poison.
	* Makefile.in (GTFILES): Put CPP_ID_DATA_H first.
	* tree-cfg.c (make_cond_expr_edges): Remove old location code.
	(make_goto_expr_edges): Likewise.
	(remove_bb): Likewise.
	(execute_warn_function_return): Likewise.
	* basic-block.h (struct edge_def) <goto_locus>: Change type to
	location_t.
	* c-common.c (fname_decl): Remove old location code.
	* tree-vect-transform.c (vect_finish_stmt_generation): Remove old
	location code.
	* rtl.h (ASM_OPERANDS_SOURCE_LOCATION): Remove old-location
	variant.
	(ASM_INPUT_SOURCE_LOCATION): Likewise.
	(gen_rtx_ASM_INPUT): Likewise.
	(gen_rtx_ASM_INPUT_loc): Likewise.
	(get_rtx_asm_OPERANDS): Remove.
	* cfglayout.c (insn_locators_alloc): Remove old location code.
	(set_curr_insn_source_location): Likewise.
	(curr_insn_locator): Likewise.
	* print-tree.c (print_node): Remove old location code.
	* tree-mudflap.c (mf_varname_tree): Remove old location code.
	(mf_file_function_line_tree): Remove test of USE_MAPPED_LOCATION.
	* cfgexpand.c (expand_gimple_cond_expr): Don't use
	location_from_locus.
	(construct_exit_block): Remove old location code.
	* emit-rtl.c (force_next_line_note): Remove old location code.
	* profile.c (branch_prob): Remove old location code.
	* tree-vectorizer.h (LOC, UNKNOWN_LOC, EXPR_LOC, LOC_FILE,
	LOC_LINE): Remove old-location variants.
	* langhooks.c (lhd_print_error_function): Remove old location
	code.
	* configure, config.in: Rebuilt.
	* configure.ac (--enable-mapped-location): Remove.
	* c-decl.c (c_init_decl_processing): Remove old location code.
	(finish_function): Likewise.
	* recog.c (decode_asm_operands): Remove old location code.
	* c-pch.c (c_common_read_pch): Remove old location code.
	* rtl.def (ASM_INPUT, ASM_OPERANDS): Remove old location
	variants.
	* gimple-low.c (lower_function_body): Remove old location code.
	* toplev.c (unknown_location): Remove.
	(push_srcloc): Remove old-location variant.
	(process_options): Remove old location code.
	(lang_dependent_init): Likewise.
	* input.h (UNKNOWN_LOCATION): Move definition.
	(location_t): Undeprecate.
	(source_locus): Remove.
	(location_from_locus): Remove.
	(struct location_s): Remove.
	Remove all old-location code.
	(input_line, input_filename): Remove.
	* final.c (final_scan_insn): Remove old location code.
	* diagnostic.c (diagnostic_build_prefix): Remove
	USE_MAPPED_LOCATION test.
	* tree.h (gimple_stmt) <locus>: Now a location_t.
	(tree_exp) <locus>: Likewise.
	(DECL_IS_BUILTIN): Remove old-location variant.
	(annotate_with_file_line, annotate_with_locus): Likewise.
	(expr_locus, set_expr_locus): Update.
	* tree.c (build1_stat): Remove old location code.
	(last_annotated_node): Remove.
	(annotate_with_file_line): Remove old-location variant.
	(annotate_with_locus): Likewise.
	(expr_location): Remove old location code.
	(set_expr_location): Likewise.
	(expr_has_location): Likewise.
	(expr_locus): Likewise.
	(set_expr_locus): Likewise.
	(expr_filename): Don't use location_from_locus.
	(expr_lineno): Likewise.
	* rtl-error.c (location_for_asm): Remove old location code.
	* c-lex.c (cb_line_change): Remove old location code.
	(fe_file_change): Likewise.
	(cb_def_pragma): Likewise.
	(c_lex_with_flags): Likewise.
	* gengtype.c (do_typedef): Don't special-case location types.
	(define_location_structures): Remove.
	(main): Don't call define_location_structures.
	* tree-pretty-print.c (dump_implicit_edges): Remove old location
	code.
gcc/ada
	* misc.c (internal_error_function): Remove test of
	USE_MAPPED_LOCATION.
	* trans.c (gigi): Remove test of USE_MAPPED_LOCATION.
	(Sloc_to_locus): Remove old location code.
gcc/cp
	* parser.c (eof_token): Remove old location code.
	(check_empty_body): Remove test of USE_MAPPED_LOCATION.
	* decl2.c (generate_ctor_or_dtor_function): Remove old location
	code.
	(cp_write_global_declarations): Likewise.
	* lex.c (cxx_init): Remove old location code.
	(handle_pragma_implementation): Remove test of
	USE_MAPPED_LOCATION.
	* pt.c (tsubst): Remove old location code.
	* error.c (cp_print_error_function): Remove test of
	USE_MAPPED_LOCATION.
	* decl.c (pop_label): Remove old location code.
	(finish_function): Likewise.
gcc/fortran
	* trans-io.c (set_error_locus): Remove old location code.
	* trans-decl.c (gfc_set_decl_location): Remove old location code.
	* f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
	* scanner.c (gfc_gobble_whitespace): Remove old location code.
	(get_file): Likewise.
	(preprocessor_line): Likewise.
	(load_file): Likewise.
	(gfc_new_file): Likewise.
	* trans.c (gfc_trans_runtime_check): Remove old location code.
	(gfc_get_backend_locus): Likewise.
	(gfc_set_backend_locus): Likewise.
	* data.c (gfc_assign_data_value): Remove old location code.
	* error.c (show_locus): Remove old location code.
	* gfortran.h (gfc_linebuf): Remove old location code.
	(gfc_linebuf_linenum): Remove old-location variant.
gcc/java
	* lang.c (java_post_options): Remove conditional.
	* expr.c (expand_byte_code): Remove old location code.
	* jcf-parse.c (set_source_filename): Remove old location code.
	(give_name_to_class): Likewise.
	(jcf_parse): Likewise.
	(duplicate_class_warning): Likewise.
	(parse_class_file): Likewise.
	(java_parse_file): Likewise.
	* decl.c (finish_method): Remove old location code.
	* class.c (push_class): Remove old location code.
gcc/objc
	* objc-act.c (objc_init): Remove old location code.
gcc/treelang
	* tree1.c (treelang_init): Remove old location code.
	(treelang_parse_file): Likewise.
	* lex.l (LINEMAP_POSITION_FOR_COLUMN): Remove.
	(update_lineno_charno): Remove old location code.

From-SVN: r132679
2008-02-26 16:05:24 +00:00
Kaveh R. Ghazi 72fb133fcb re PR other/35107 (GCC unnecessarily links shared libs with xgcc, gcov, cpp, jcf-dump, etc.)
2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	PR other/35107
	* Makefile.in (LIBS): Remove $(GMPLIBS).
	(cc1-dummy, cc1): Add $(GMPLIBS).

ada:
	PR other/35107
	* Make-lang.in (gnat1): Add $(GMPLIBS).

cp:
	PR other/35107
	* Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).

fortran:
	PR other/35107
	* Make-lang.in (f951): Add $(GMPLIBS).

java:
	PR other/35107
	* Make-lang.in (jc1): Add $(GMPLIBS).

objc:
	PR other/35107
	* Make-lang.in (cc1obj-dummy, cc1obj): Add $(GMPLIBS).

objcp:
	PR other/35107
	* Make-lang.in (cc1objplus-dummy, cc1objplus): Add $(GMPLIBS).

treelang:
	PR other/35107
	* Make-lang.in (tree1): Add $(GMPLIBS).

From-SVN: r132160
2008-02-06 21:51:24 +00:00
Nick Clifton 2b7d992abd Make-lang.in: Change copyright header to refer to version 3 of the GNU General Public License...
* Make-lang.in: Change copyright header to refer to version 3 of the GNU General
  Public License and to point readers at the COPYING3 file and the FSF's license
  web page.
* lang-specs.h, objc-act.c, objc-tree.def, objc-act.h, config-lang.in, 
  objc-lang.c: Likewise.

From-SVN: r127155
2007-08-02 10:37:36 +00:00
Kaveh R. Ghazi fa233e34c9 attribs.c (hash_attr, [...]): Constify.
* attribs.c (hash_attr, eq_attr, init_attributes): Constify.
	* builtins.c (validate_arg, builtin_mathfn_code,
	validate_arglist): Likewise.
	* calls.c (call_expr_flags): Likewise.
	* combine.c (reg_nonzero_bits_for_combine,
	reg_num_sign_bit_copies_for_combine, get_last_value,
	reg_truncated_to_mode): Likewise.
	* emit-rtl.c (subreg_lowpart_p): Likewise.
	* expr.c (highest_pow2_factor_for_target,
	categorize_ctor_elements_1, categorize_ctor_elements,
	count_type_elements, contains_packed_reference,
	highest_pow2_factor, highest_pow2_factor_for_target): Likewise.
	* fold-const.c (may_negate_without_overflow_p, int_const_binop,
	fold_convertible_p, operand_equal_p, tree_swap_operands_p,
	native_encode_int, native_encode_real, native_encode_complex,
	native_encode_vector, native_encode_expr, native_interpret_int,
	native_interpret_real, native_interpret_complex,
	native_interpret_vector, native_interpret_expr): Likewise.
	* function.c (use_register_for_decl): Likewise.
	* gimplify.c (get_name): Likewise.
	* langhooks-def.h (lhd_return_null_const_tree): New.
	(LANG_HOOKS_GET_CALLEE_FNDECL): Use it.
	* langhooks.c (lhd_return_null_const_tree): New.
	* langhooks.h (lang_get_callee_fndecl): Constify.
	* output.h (constructor_static_from_elts_p): Likewise.
	* rtl-factoring.c (gen_symbol_ref_rtx_for_label): Likewise.
	* rtl.h (nonzero_bits, num_sign_bit_copies, truncated_to_mode,
	subreg_lowpart_p, noop_move_p, struct rtl_hooks): Likewise.
	* rtlanal.c (cached_nonzero_bits, nonzero_bits1,
	cached_num_sign_bit_copies, num_sign_bit_copies1, noop_move_p,
	nonzero_bits, num_sign_bit_copies, truncated_to_mode): Likewise.
	* rtlhooks-def.h (reg_nonzero_bits_general,
	reg_num_sign_bit_copies_general, reg_truncated_to_mode_general):
	Likewise. 
	* rtlhooks.c (reg_num_sign_bit_copies_general,
	reg_nonzero_bits_general, reg_truncated_to_mode_general):
	Likewise. 
	* stmt.c (warn_if_unused_value, is_body_block): Likewise.
	* stor-layout.c (mode_for_size_tree): Likewise.
	* tree-ssa-loop-im.c (memref_eq): Likewise.
	* tree-ssa-loop-ivopts.c (tree_int_cst_sign_bit): Likewise.
	* tree.c (contains_placeholder_p, type_list_equal,
	simple_cst_equal, get_callee_fndecl, operand_equal_for_phi_arg_p):
	Likewise. 
	* tree.h (tree_int_cst_sign_bit, may_negate_without_overflow_p,
	mode_for_size_tree, categorize_ctor_elements, count_type_elements,
	contains_placeholder_p, contains_packed_reference,
	get_callee_fndecl, operand_equal_for_phi_arg_p,
	warn_if_unused_value, is_body_block, native_encode_expr,
	native_interpret_expr, fold_convertible_p, operand_equal_p,
	int_const_binop, tree_swap_operands_p, builtin_mathfn_code,
	validate_arglist, simple_cst_equal, type_list_equal,
	use_register_for_decl, call_expr_flags, get_name,
	highest_pow2_factor): Likewise.
	(const_call_expr_arg_iterator_d,
	init_const_call_expr_arg_iterator, next_const_call_expr_arg,
	first_const_call_expr_arg, more_const_call_expr_args_p,
	FOR_EACH_CONST_CALL_EXPR_ARG): New.
	* varasm.c (constructor_static_from_elts_p): Constify.
	
cp:
	* parser.c (eof_token): Un-constify.
	(cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
	cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
	casts.

java:
	* lang.c (java_get_callee_fndecl): Constify.

objc:
	* objc-act.c (objc_get_callee_fndecl): Constify.
	* objc-act.h (objc_get_callee_fndecl): Likewise.

From-SVN: r127036
2007-07-29 05:43:43 +00:00
Kaveh R. Ghazi 741ac90383 c-common.c (fname_as_string, [...]): Constify.
* c-common.c (fname_as_string, c_type_hash): Constify.
	* c-typeck.c (free_all_tagged_tu_seen_up_to): Likewise.
	* cgraph.c (edge_hash, edge_eq): Likewise.
	* dwarf2out.c (decl_die_table_eq, decl_loc_table_eq): Likewise.
	* emit-rtl.c (mem_attrs_htab_eq, reg_attrs_htab_hash,
	reg_attrs_htab_eq): Likewise.
	* except.c (t2r_eq, t2r_hash, ttypes_filter_eq, ehl_hash, ehl_eq):
	Likewise.
	* genautomata.c (const_reserv_sets_t, const_unit_decl_t,
	const_decl_t, const_state_t, const_automata_list_el_t): New.
	(first_out_arc, DECL_UNIT, DECL_BYPASS, DECL_AUTOMATON, DECL_EXCL,
	DECL_PRESENCE, DECL_ABSENCE, DECL_RESERV, DECL_INSN_RESERV,
	automaton_decl_hash, automaton_decl_eq_p, insn_decl_hash,
	insn_decl_eq_p, decl_hash, decl_eq_p, alt_state_cmp,
	reserv_sets_cmp, reserv_sets_eq, state_hash, state_eq_p,
	automata_list_hash, automata_list_eq_p, compare_states_for_equiv,
	compare_max_occ_cycle_nums, out_state_arcs_num,
	compare_transition_els_num, units_cmp, state_reservs_cmp):
	Constify.
	* genmodes.c (cmp_modes): Likewise.
	* ggc-common.c (saving_htab_hash, saving_htab_eq): Likewise.
	* gimplify.c (compare_case_labels): Likewise.
	* ipa-type-escape.c (get_name_of_type, type_brand_s): Likewise.
	* loop-unroll.c (si_info_hash, ve_info_hash): Likewise.
	* matrix-reorg.c (mtt_info_hash): Likewise.
	* postreload-gcse.c (hash_expr_for_htab, expr_equiv_p): Likewise.
	* rtl-factoring.c (const_p_hash_bucket, const_p_hash_elem): New.
	(htab_hash_bucket, htab_hash_elem): Constify.
	* tree-browser.c (TB_parent_eq): Likewise.
	* tree-scalar-evolution.c (hash_scev_info): Likewise.
	* tree-ssa-alias.c (sort_tags_by_id): Likewise.
	* tree-ssa-coalesce.c (const_coalesce_pair_p): New.
	(coalesce_pair_map_hash, coalesce_pair_map_eq, compare_pairs):
	Constify.
	* tree-ssa-dom.c (avail_expr_hash, avail_expr_eq): Likewise.
	* tree-ssa-pre.c (const_expr_pred_trans_t): New.
	(expr_pred_trans_hash, expr_pred_trans_eq): Constify.
	* tree-ssa-sccvn.c (const_vn_binary_op_t, const_vn_unary_op_t,
	const_vn_phi_t, const_vn_reference_op_t, const_vn_reference_t):
	New.
	(vn_reference_op_eq, vn_reference_hash, vn_reference_eq,
	vn_unary_op_hash, vn_unary_op_eq, vn_binary_op_hash,
	vn_binary_op_eq, vn_phi_hash, vn_phi_eq): Constify.
	* tree-ssa-threadupdate.c (redirection_data_hash,
	redirection_data_eq): Likewise. 
	* tree-ssa-uncprop.c (equiv_hash, equiv_eq): Likewise.
	* tree-ssa.c (var_ann_eq): Likewise.
	* tree-vrp.c (compare_case_labels): Likewise.
	* tree.c (int_cst_hash_hash, int_cst_hash_eq,
	tree_map_base_marked_p, type_hash_marked_p, tree_check_failed,
	tree_not_check_failed, tree_class_check_failed,
	tree_range_check_failed, tree_not_class_check_failed,
	omp_clause_check_failed, omp_clause_range_check_failed,
	tree_contains_struct_check_failed, tree_operand_check_failed):
	Likewise. 
	* tree.h (tree_contains_struct_check_failed, tree_check_failed,
	tree_not_check_failed, tree_class_check_failed,
	tree_range_check_failed, tree_not_class_check_failed,
	tree_operand_check_failed, omp_clause_operand_check_failed,
	tree_operand_length): Likewise. 
	* var-tracking.c (const_variable): New.
	(variable_htab_hash, variable_htab_eq): Constify.
	* varasm.c (const_desc_hash): Likewise.

cp:
	* decl.c (typename_hash, typename_compare): Constify.
	* mangle.c (hash_type, compare_type): Likewise.
	* pt.c (eq_local_specializations, hash_local_specialization):
	Likewise.
	* tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
	list_hash): Likewise.
	* typeck2.c (pat_compare): Likewise.

fortran:
	* gfortran.h (generate_isocbinding_symbol): Constify.
	* symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
	generate_isocbinding_symbol): Likewise.

java:
	* class.c (java_treetreehash_hash, java_treetreehash_compare):
	Constify. 
	* expr.c (type_assertion_eq): Likewise.
	* jcf-io.c (compare_path): Likewise.
	* jcf-parse.c (cmpstringp): Likewise.
	* verify-impl.c (get_one_type, compute_argument_types,
	compute_return_type): Likewise. 

objc:
	* objc-act.c (volatilized_hash, volatilized_eq, string_hash,
	string_eq): Constify.

From-SVN: r126925
2007-07-25 19:06:06 +00:00
Stuart Hastings dd1af55f6a re PR objc/31281 (ICE on ObjC try-catch blocks with next runtime)
PR 31281
	* objc/objc-act.c (next_sjlj_build_catch_list): Delete volatile from rethrow decl.
	* testsuite/objc/execute/exceptions/pr31281.m: New.

From-SVN: r123501
2007-04-04 18:37:14 +00:00
Zack Weinberg 11a675992a gengtype.c: Don't include gtyp-gen.h.
* gengtype.c: Don't include gtyp-gen.h.
	(srcdir): Declare here.
	(base_files, lang_dir_names): Allocate dynamically.
	(gt_files, num_gt_files, num_lang_dirs): New globals.
	(measure_input_list, read_input_line, read_input_list)
	(set_lang_bitmap): New functions.
	(get_base_file_bitmap): Rename get_lang_bitmap and drastically
	simplify, relying on read_input_list to set up the bitmaps.
	(main): Arguments are no longer unused.  Check for correct number
	of command line arguments, set srcdir and srcdir_len, then call
	read_input_list, before doing anything else.  No need to worry
	about duplicates in main loop.
	* configure.ac: Simplify the calculation of all_gtfiles.
	Put language tags in there.  Don't set or substitute
	all_gtfiles_files_langs or all_gtfiles_files_frags.
	* Makefile.in: Revamp the way gengtype is invoked, now that it
	takes a file on its command line with a much simpler format.
	Remove or replace with gtyp-input.list all references to gtyp-gen.h.
	(GTFILES): Remove duplicates and C source files.
	* c-config-lang.in, cp/config-lang.in, objc/config-lang.in
	* objcp/config-lang.in: Add c-pragma.h to gtfiles.
	* configure: Regenerate.

From-SVN: r123234
2007-03-26 21:07:27 +00:00
Brooks Moses 95506ebf3c * Make-lang.in: Add dummy lang.install-pdf target.
From-SVN: r122455
2007-03-01 16:15:32 -08:00
Kazu Hirata c9819cb2bc * objc/objc-act.c: Fix comment typos.
From-SVN: r122085
2007-02-18 01:45:58 +00:00
Sandra Loosemore 5039610b96 tree.h (enum tree_code_class): Add tcc_vl_exp.
2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* tree.h (enum tree_code_class): Add tcc_vl_exp.
	(VL_EXP_CLASS_P): New.
	(TREE_OPERAND_CHECK): Use TREE_OPERAND_LENGTH instead of
	TREE_CODE_LENGTH.
	(TREE_OPERAND_CHECK_CODE): Likewise.
	(GIMPLE_STMT_OPERAND_CHECK): Likewise.
	(TREE_RTL_OPERAND_CHECK): Likewise.
	(tree_operand_check_failed): Make second parameter the whole tree
	instead of its code.  Fixed callers.
	(VL_EXP_CHECK): New.
	(TREE_OPERAND_LENGTH): New.
	(VL_EXP_OPERAND_LENGTH): New.
	(CALL_EXPR_FN): New.
	(CALL_EXPR_STATIC_CHAIN): New.
	(CALL_EXPR_ARGS): New.
	(CALL_EXPR_ARG): New.
	(call_expr_nargs): New.
	(CALL_EXPR_ARGP): New.
	(build_nt_call_list): Declare.
	(build_vl_exp_stat): Declare.
	(build_vl_exp): New.
	(build_call_list): Declare.
	(build_call_nary): Declare.
	(build_call_valist): Declare.
	(build_call_array): Declare.
	(call_expr_arg): Declare.
	(call_expr_argp): Declare.
	(call_expr_arglist): Declare.
	(fold_build_call_list): Declare.
	(fold_build_call_list_initializer): Declare.
	(fold_call_expr): Declare to replace fold_builtin.
	(fold_builtin_fputs): Update to agree with modified definition.
	(fold_builtin_strcpy): Likewise.
	(fold_builtin_strncpy): Likewise.
	(fold_builtin_memory_chk): Likewise.
	(fold_builtin_stxcpy_chk): Likewise.
	(fold_builtin_strncpy_chk): Likewise.
	(fold_builtin_next_arg): Likewise.
	(fold_build_call_expr): Declare.
	(fold_builtin_call_list): Declare.
	(fold_builtin_call_valist): Declare.
	(build_call_expr): Declare.
	(validate_arglist): Update to agree with modified definition.
	(tree_operand_length): New.
	(call_expr_arg_iterator): New.
	(init_call_expr_arg_iterator): New.
	(next_call_expr_arg): New.
	(first_call_expr_arg): New.
	(more_call_expr_args_p): New.
	(FOR_EACH_CALL_EXPR_ARG): New.

	* tree.c (tree_code_class_string): Add entries for tcc_vl_exp
	and tcc_gimple_stmt.
	(tree_code_size): Update documentation.  Use sizeof (tree) rather
	than sizeof (char *).
	(tree_size): Likewise.  Add case for tcc_vl_exp.
	(tree_node_structure): Add case for tcc_vl_exp.
	(contains_placeholder_p): Likewise.
	(substitute_in_expr): Likewise.
	(substitute_placeholder_in_expr): Likewise.
	(stabilize_reference_1): Likewise.
	(build3_stat): Remove logic for CALL_EXPRs.  Replace with assertion
	to diagnose breakage of this interface for constructing CALL_EXPRs.
	(build_nt): Add similar assertion here.
	(build_nt_call_list): New.
	(simple_cst_equal) <CALL_EXPR>: Rewrite to use new accessors.
	(iterative_hash_expr): Use TREE_OPERAND_LENGTH instead of
	TREE_CODE_LENGTH.
	(get_callee_fndecl): Use new CALL_EXPR accessors.
	(tree_operand_check_failed): Change parameters to pass entire node
	instead of its code, so that we can call TREE_OPERAND_LENGTH on it.
	(process_call_operands): New.
	(build_vl_exp_stat): New.
	(build_call_list): New.
	(build_call_nary): New.
	(build_call_valist): New.
	(build_call_array): New.
	(walk_tree): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
	(call_expr_arglist): New.

	* tree.def (CALL_EXPR): Change representation of CALL_EXPRs to use
	tcc_vl_exp instead of a fixed-size tcc_expression.

	* doc/c-tree.texi (CALL_EXPR): Document new representation and
	accessors for CALL_EXPRs.
	(AGGR_INIT_EXPR): Likewise.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* builtins.c (c_strlen): Return NULL_TREE instead of 0.
	(expand_builtin_nonlocal_goto): Change parameter to be entire
	CALL_EXPR instead of an arglist.  Use new CALL_EXPR accessors.
	(expand_builtin_prefetch): Likewise.
	(expand_builtin_classify_type): Likewise.
	(mathfn_built_in): Return NULL_TREE instead of 0.
	(expand_errno_check): Use new CALL_EXPR accessors.
	(expand_builtin_mathfn): Use new CALL_EXPR accessors and constructors.
	Return NULL_RTX instead of 0.
	(expand_builtin_mathfn_2): Likewise.
	(expand_builtin_mathfn_3): Likewise.
	(expand_builtin_interclass_mathfn): Likewise.
	(expand_builtin_sincos): Likewise.
	(expand_builtin_cexpi): Likewise.
	(expand_builtin_int_roundingfn): Likewise.
	(expand_builtin_int_roundingfn_2): Likewise.
	(expand_builtin_pow): Likewise.
	(expand_builtin_powi): Likewise.
	(expand_builtin_strlen): Pass entire CALL_EXPR as parameter instead
	of arglist, fixing callers appropriately.  Use new CALL_EXPR
	accessors and constructors.  Return NULL_RTX instead of 0.
	(expand_builtin_strstr): Likewise.
	(expand_builtin_strchr): Likewise.
	(expand_builtin_strrchr): Likewise.
	(expand_builtin_strpbrk): Likewise.
	(expand_builtin_memcpy): Likewise.
	(expand_builtin_mempcpy): Likewise.
	(expand_builtin_mempcpy_args): New.
	(expand_builtin_memmove): Similarly to expand_builtin_mempcpy.
	(expand_builtin_memmove_args): New.
	(expand_builtin_bcopy): Similarly to expand_builtin_mempcpy.
	(expand_movstr): Likewise.
	(expand_builtin_strcpy): Likewise.
	(expand_builtin_strcpy_args): New.
	(expand_builtin_stpcpy): Similarly to expand_builtin_strcpy.
	(expand_builtin_strncpy): Likewise.
	(expand_builtin_memset): Likewise.
	(expand_builtin_memset_args): New.
	(expand_builtin_bzero): Similarly to expand_builtin_memset.
	(expand_builtin_memcmp): Likewise.
	(expand_builtin_strcmp): Likewise.
	(expand_builtin_strncmp): Likewise.
	(expand_builtin_strcat): Likewise.
	(expand_builtin_strncat): Likewise.
	(expand_builtin_strspn): Likewise.
	(expand_builtin_strcspn): Likewise.
	(expand_builtin_args_info): Likewise.
	(expand_builtin_va_start): Likewise.
	(gimplify_va_arg_expr): Likewise.
	(expand_builtin_va_end): Likewise.
	(expand_builtin_va_copy): Likewise.
	(expand_builtin_frame_address): Likewise.
	(expand_builtin_alloca): Likewise.
	(expand_builtin_bswap): Likewise.
	(expand_builtin_unop): Likewise.
	(expand_builtin_fputs): Likewise.
	(expand_builtin_expect): Likewise.
	(expand_builtin_fabs): Likewise.
	(expand_builtin_copysign): Likewise.
	(expand_builtin_printf): Likewise.
	(expand_builtin_fprintf): Likewise.
	(expand_builtin_sprintf): Likewise.
	(expand_builtin_init_trampoline): Likewise.
	(expand_builtin_signbit): Likewise.
	(expand_builtin_fork_or_exec): Likewise.
	(expand_builtin_sync_operation): Likewise.
	(expand_builtin_compare_and_swap): Likewise.
	(expand_builtin_lock_test_and_set): Likewise.
	(expand_builtin_lock_release): Likewise.
	(expand_builtin): Likewise.
	(builtin_mathfn_code): Likewise.

	(fold_builtin_constant_p): Pass call arguments individually instead
	of as an arglist, fixing callers appropriately.  Use new CALL_EXPR
	accessors and constructors.  Return NULL_TREE instead of 0.
	(fold_builtin_expect): Likewise.
	(fold_builtin_classify_type): Likewise.
	(fold_builtin_strlen): Likewise.
	(fold_builtin_nan): Likewise.
	(integer_valued_real_p): Likewise.
	(fold_trunc_transparent_mathfn): Likewise.
	(fold_fixed_mathfn): Likewise.
	(fold_builtin_cabs): Likewise.
	(fold_builtin_sqrt): Likewise.
	(fold_builtin_cbrt): Likewise.
	(fold_builtin_cos): Likewise.
	(fold_builtin_cosh): Likewise.
	(fold_builtin_tan): Likewise.
	(fold_builtin_sincos): Likewise.
	(fold_builtin_cexp): Likewise.
	(fold_builtin_trunc): Likewise.
	(fold_builtin_floor): Likewise.
	(fold_builtin_ceil): Likewise.
	(fold_builtin_round): Likewise.
	(fold_builtin_int_roundingfn): Likewise.
	(fold_builtin_bitop): Likewise.
	(fold_builtin_bswap): Likewise.
	(fold_builtin_logarithm): Likewise.
	(fold_builtin_hypot): Likewise.
	(fold_builtin_pow): Likewise.
	(fold_builtin_powi): Likewise.
	(fold_builtin_exponent): Likewise.
	(fold_builtin_memset): Likewise.
	(fold_builtin_bzero): Likewise.
	(fold_builtin_memory_op): Likewise.
	(fold_builtin_bcopy): Deleted; call site changed to invoke
	fold_builtin_memory_op directly.
	(fold_builtin_strcpy): Similarly as for fold_builtin_memory_op.
	(fold_builtin_strncpy): Likewise.
	(fold_builtin_memcmp): Likewise.
	(fold_builtin_strcmp): Likewise.
	(fold_builtin_strncmp): Likewise.
	(fold_builtin_signbit): Likewise.
	(fold_builtin_copysign): Likewise.
	(fold_builtin_isascii): Likewise.
	(fold_builtin_toascii): Likewise.
	(fold_builtin_isdigit): Likewise.
	(fold_builtin_fabs): Likewise.
	(fold_builtin_abs): Likewise.
	(fold_builtin_fmin_fmax): Likewise.
	(fold_builtin_carg): Likewise.
	(fold_builtin_classify): Likewise.
	(fold_builtin_unordered_cmp): Likewise.

	(fold_builtin_0, fold_builtin_2, fold_builtin_3, fold_builtin_4):
	New functions split out from fold_builtin_1.
	(fold_builtin_n): New.
	(fold_builtin_varargs): New.
	(fold_builtin): Deleted.  Most callers changed to use fold_call_expr
	instead.
	(fold_call_expr): New.
	(build_function_call_expr): Rewrite to use new helper function.
	(fold_builtin_call_list): New.
	(build_call_expr): New.
	(fold_builtin_call_valist): New.
	(rewrite_call_expr): New.
	(validate_arg): New.
	(validate_arglist): Change parameter to be entire CALL_EXPR instead
	of an arglist.  Change return type to bool.  Use new CALL_EXPR
	accessors.

	(fold_builtin_strstr):  Pass call arguments individually instead
	of as an arglist, fixing callers appropriately.  Use new CALL_EXPR
	accessors and constructors.  Return NULL_TREE instead of 0.
	(fold_builtin_strchr): Likewise.
	(fold_builtin_strrchr): Likewise.
	(fold_builtin_strpbrk): Likewise.
	(fold_builtin_strcat): Likewise.
	(fold_builtin_strncat): Likewise.
	(fold_builtin_strspn): Likewise.
	(fold_builtin_strcspn): Likewise.
	(fold_builtin_fputs): Likewise.
	(fold_builtin_next_arg): Likewise.
	(fold_builtin_sprintf): Likewise.

	(expand_builtin_object_size): Use new CALL_EXPR accessors.  Use
	NULL_RTX instead of 0.
	(expand_builtin_memory_chk): Likewise.
	(maybe_emit_chk_warning): Likewise.
	(maybe_emit_sprintf_chk_warning): Likewise.

	(fold_builtin_object_size): Pass call arguments individually instead
	of as an arglist, fixing callers appropriately.  Use new CALL_EXPR
	accessors and constructors.  Return NULL_TREE instead of 0.
	(fold_builtin_memory_chk): Likewise.
	(fold_builtin_stxcpy_chk): Likewise.
	(fold_builtin_strncpy_chk): Likewise.
	(fold_builtin_strcat_chk): Likewise.
	(fold_builtin_strcat_chk): Likewise.
	(fold_builtin_strncat_chk): Likewise.
	(fold_builtin_sprintf_chk): Likewise.
	(fold_builtin_snprintf_chk): Likewise.
	(fold_builtin_printf): Likewise.
	(fold_builtin_vprintf): Likewise.

	* fold-const.c (negate_expr_p): Use new CALL_EXPR accessors and
	constructors.
	(operand_equal_p): Add separate tcc_vl_exp/CALL_EXPR case.
	(make_range): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
	(extract_muldiv_1): Add VL_EXP_CLASS_P case.
	(fold_mathfn_compare): Use new CALL_EXPR accessors and constructors.
	(fold_unary): Likewise.
	(fold_binary): Likewise.
	(fold_ternary): Remove CALL_EXPR case, since they are no longer
	ternary expressions.
	(fold): Add logic for tcc_vl_exp.
	(fold_checksum_tree):  Make it know about tcc_vl_exp.  Use
	TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
	(fold_build3_stat): Add assertion to flag broken interface for
	constructing CALL_EXPRs.
	(fold_build_call_list): New.
	(fold_build_call_list_initializer): New.
	(tree_expr_nonnegative_p): Use new CALL_EXPR accessors and
	constructors.
	(fold_strip_sign_ops): Likewise.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* tree-dump.c (dequeue_and_dump) <CALL_EXPR>: Use new CALL_EXPR
	accessors and dump arguments explicitly.

	* tree-pretty-print.c (do_niy): Use TREE_OPERAND_LENGTH instead of
	TREE_CODE_LENGTH.
	(dump_generic_node): Use new CALL_EXPR accessors and walk arguments
	explicitly.
	(print_call_name): Use new CALL_EXPR accessors.

	* print-tree.c (print_node): Add case tcc_vl_exp.  Print
	CALL_EXPR arguments explicitly instead of as a list.  Use
	TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.

	* tree-vrp.c (stmt_interesting_for_vrp): Use new CALL_EXPR accessors.
	(vrp_visit_stmt): Likewise.

	* tree-ssa-loop-im.c (outermost_invariant_loop_expr):  Make it
	know about tcc_vl_exp.  Use TREE_OPERAND_LENGTH instead of
	TREE_CODE_LENGTH.
	(force_move_till_expr): Likewise.

	* targhooks.c (default_external_stack_protect_fail): Use
	build_call_expr instead of build_function_call_expr.
	(default_hidden_stack_protect_fail): Likewise.

	* tree-complex.c (expand_complex_libcall): Use build_call_expr to
	build the call.

	* cgraphbuild.c (build_cgraph_edges): Use new CALL_EXPR accessors
	and walk arguments explicitly.

	* tree-ssa-loop-niter.c (simplify_replace_tree): Use
	TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
	(expand_simple_operations): Likewise.
	(infer_loop_bounds_from_array): Use new CALL_EXPR accessors.

	* gengtype.c (adjust_field_tree_exp): Use TREE_OPERAND_LENGTH instead
	of TREE_CODE_LENGTH.
	(walk_type): Tweak walking of arrays not to blow up on CALL_EXPRs.

	* optabs.c (expand_widen_pattern-expr): Use TREE_OPERAND_LENGTH
	instead of TREE_CODE_LENGTH.

	* value_prof.c (tree_ic): Use new CALL_EXPR accessors.
	(tree_ic_transform): Likewise.
	(interesting_stringop_to_profile_p): Pass entire CALL_EXPR as
	parameter instead of arglist.  Fix callers.
	(tree_stringop_fixed_value): Use new CALL_EXPR accessors.
	(tree_stringops_transform): Likewise.
	(tree_indirect_call_to_profile): Likewise.
	(tree_stringops_values_to_profile): Likewise.

	* tree-tailcall.c (find_tail_calls): Use new CALL_EXPR iterator.
	(eliminate_tail_call): Likewise.

	* ipa-cp.c (ipcp_update_callgraph): Use new CALL_EXPR accessors.

	* tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
	Use TREE_OPERAND_LENGTH and generalize to handle any number of
	operands.
	(instantiate_parameters_1): Can't handle tcc_vl_exp here.

	* omp-low.c (build_omp_barrier): Use build_call_expr.
	(lower_rec_input_clauses): Likewise.
	(lower_reduction_clauses): Likewise.
	(expand_parallel_call): Likewise.
	(maybe_catch_exception): Likewise.
	(expand_omp_for_generic): Likewise.
	(expand_omp_for_static_nochunk): Likewise.
	(expand_omp_sections): Likewise.
	(lower_omp_single_simple): Likewise.
	(lower_omp_single_copy): Likewise.
	(lower_omp_master): Likewise.
	(lower_omp_ordered): Likewise.
	(lower_omp_critical): Likewise.

	* ipa-reference.c (check-call): Use new CALL_EXPR iterator.
	(scan_for_static_refs): Create tcc_vl_exp case for CALL_EXPR.

	* tree-gimple.c (is_gimple_call_addr): Fix doc.
	(recalculate_side_effects): Use TREE_OPERAND_LENGTH instead of
	TREE_CODE_LENGTH.  Add tcc_vl_exp case.

	* tree-chrec.c (chrec_contains_symbols): Use TREE_OPERAND_LENGTH
	and generalize to handle any number of operands.
	(chrec_contains_undetermined): Likewise.
	(tree_contains_chrecs): Likewise.
	(evolution_function_is_invariant_rec_p): Use TREE_OPERAND_LENGTH.

	* cgraphunit.c (update_call_expr): Use new CALL_EXPR accessors.

	* tree-ssa-ccp.c (ccp_fold): Use new CALL_EXPR accessors.  Use
	fold_call_expr instead of fold_builtin.
	(ccp_fold_builtin): Likewise.  Update calls into builtins.c to
	match declarations there.
	(fold_stmt): Use new CALL_EXPR constructor and accessors.  Doc
	updates.

	* tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Use
	TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.

	* ipa-pure-const.c (check_call): Use new CALL_EXPR accessors.
	(scan_function): Add case tcc_vl_exp for CALL_EXPR.

	* tree-stdarg.c (execute_optimize_stdarg): Use new CALL_EXPR
	accessors.

	* tree-ssa-math-opts.c (execute_cse_sincos_1): Use build_call_expr.
	(execute_cse_sincos): Use new CALL_EXPR accessors.

	* tree-ssa-alias.c (find_used_portions): Use new CALL_EXPR iterator.

	* gimple-low.c (lower_function_body): Use build_call_expr.
	(lower_builtin_setjmp): Likewise.

	* expr.c (emit_block_move_via_libcall): Use build_call_expr.
	(set_storage_via_libcall): Likewise.
	(safe_from_p): Add tcc_vl_exp case.  Use TREE_OPERAND_LENGTH
	instead of TREE_CODE_LENGTH.
	(expand_expr_real_1): Use new CALL_EXPR accessors.

	* tree-browser.c (store_child_info): Use TREE_OPERAND_LENGTH and
	generalize to handle any number of operands.
	(TB_parent_eq): Likewise.

	* predict.c (expr_expected_value): Use new CALL_EXPR accessors.
	(strip_builtin_expect): Likewise.

	* function.c (gimplify_parameters): Use build_call_expr.

	* tree-vectorizer.c (vect_is_simple_reduction): Use TREE_OPERAND_LENGTH
	instead of TREE_CODE_LENGTH.

	* ipa-type-escape.c (check_call): Use new CALL_EXPR iterators.
	(scan_for_refs): Add case tcc_vl_exp for CALL_EXPR.

	* tree-data-ref.c (get_references_in_stmt): Use new CALL_EXPR
	iterators.

	* gimplify.c (build_stack_save_restore): Use build_call_expr.
	(gimplify_decl_expr): Likewise.
	(gimplify_call_expr): Use fold_call_expr instead of fold_builtin.
	Use new CALL_EXPR iterators.
	(gimplify_modify_expr_to_memcpy): Use build_call_expr.
	(gimplify_modify_expr_to_memset): Likewise.
	(gimplify_variable_sized_compare): Likewise.
	(gimplify_omp_atomic_fetch_op): Likewise.
	(gimplify_omp_atomic_pipeline): Likewise.
	(gimplify_omp_atomic_mutex): Likewise.
	(gimplify_function_tree): Likewise.

	* calls.c (alloca_call_p): Use new CALL_EXPR accessors.
	(call_expr_flags): Likewise.
	(expand_call): Likewise.

	* except.c (expand_builtin_eh_return_data_regno): Pass entire
	CALL_EXPR as parameter instead of arglist.  Use new CALL_EXPR 
        accessors.

	* coverage.c (create_coverage): Use build_call_expr.

	* tree-ssa-pre.c (expression_node_pool, list_node_pool): Delete.
	(temp_call_expr_obstack): New.
	(pool_copy_list): Delete.
	(temp_copy_call_expr): New.
	(phi_translate): Add case tcc_vl_exp for CALL_EXPR.  Use new
	CALL_EXPR accessors.  Get rid of special goo for copying argument
	lists and use temp_copy_call_expr instead.
	(valid_in_sets): Add case tcc_vl_exp for CALL_EXPR.  Use new
	CALL_EXPR accessors.
	(create_expression_by_pieces): Likewise.  Use build_call_array
	to construct the result instead of fold_build3.
	(create_value_expr_from): Add tcc_vl_exp.  Delete special goo for
	dealing with argument lists.
	(init_pre): Remove references to expression_node_pool and
	list_node_pool.  Init temp_call_expr_obstack instead.
	(fini_pre): Remove references to expression_node_pool and
	list_node_pool.

	* tree-sra.c (sra_walk_call_expr): Use new CALL_EXPR accessors
	and walk arguments explicitly instead of as a list.

	* tree-mudflap.c (mf_build_check_statement_for): Use build_call_expr.
	(mx_register_decls): Likewise.
	(mudflap_register_call): Likewise.
	(mudflap_finish_file): Likewise.

	* ipa-prop.c (ipa_callsite_compute_count): Use new CALL_EXPR accessors.
	(ipa_callsite_compute_param): Likewise.

	* tree-vect-patterns.c (vect_recog_pow_pattern): Use new CALL_EXPR
	accessors and constructor.

	* tree-nested.c (convert_nl_goto_reference): Use new CALL_EXPR
	accessors and constructor.
	(convert_tramp_reference): Likewise. 
	(convert_call_expr): Likewise.
	(finalize_nesting_tree_1): Likewise.

	* tree-ssa.c (tree_ssa_useless_type_conversion): Use new CALL_EXPR
	accessors.

	* tree-ssa-loop-prefetch.c (issue_prefetch_ref): Use build_call_expr.

	* tree-inline.c (initialize_inlined_parameters): Pass entire
	CALL_EXPR as parameter instead of arglist.  Use new CALL_EXPR
	accessors.
	(estimate_num_insns_1): Use new CALL_EXPR accessors.
	(expand_call_inline): Tidy up call to initialize_inlined_parameters.

	* tree-vect-transform.c (vect_create_epilog_for_reduction):  Use
	TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
	(vectorizable_reduction): Likewise.
	(vectorizable_call): Use new CALL_EXPR iterators.
	(vectorizable_conversion): Use build_call_expr.
	(vectorizable_operation): Use TREE_OPERAND_LENGTH.
	(vect_gen_widened_results_half): Use build_call_expr.
	(vect_setup_realignment): Likewise.
	(vectorizable_live_operation): Use TREE_OPERAND_LENGTH.

	* tree-object-size.c (alloc_object_size): Use new CALL_EXPR accessors.
	(pass_through_call): Likewise.
	(compute_object_sizes): Likewise.  Use fold_call_expr instead of
	fold_builtin.

	* tree-profile.c (tree_gen_interval_profiler): Use build_call_expr.
	(tree_gen_pow2_profiler): Likewise.
	(tree_gen_one_value_profiler): Likewise.
	(tree_gen_ic_func_profiler): Likewise.
	(tree_gen_average_profiler): Likewise.
	(tree_gen_ior_profiler): Likewise.

	* tree-ssa-structalias.c (get_constraint_for): Add case tcc_vl_exp.
	(find_func_aliases): Use new CALL_EXPR accessors.  Add case
	tcc_vl_exp.  Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.

	* tree-ssa-reassoc.c (get_rank): Use TREE_OPERAND_LENGTH instead
	of TREE_CODE_LENGTH.

	* stmt.c (warn_if_unused_value): Use TREE_OPERAND_LENGTH instead
	of TREE_CODE_LENGTH.

	* convert.c (convert_to_real): Use new CALL_EXPR accessors and
	constructor.
	(convert_to_integer): Likewise.

	* tree-ssa-operands.c (get_call_expr_operands): Use new CALL_EXPR
	accessors.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* config/alpha/alpha.c (alpha_expand_builtin): Use new CALL_EXPR
	accessors.
	* config/frv/frv.c (frv_expand_builtin): Likewise.
	* config/s390/s390.c (s390_expand_builtin): Likewise.

	* config/sparc/sparc.c (sparc_gimplify_va_arg): Use build_call_expr.
	(sparc_expand_builtin): Use new CALL_EXPR accessors.

	* config/i386/i386.c (ix86_function_ok_for_sibcall): Likewise.
	(ix86_expand_binop_builtin): Pass entire CALL_EXPR as parameter
	instead of arglist.  Use new CALL_EXPR accessors on it.  Fix callers.
	(ix86_expand_store_builtin): Likewise.
	(ix86_expand_unop_builtin): Likewise.
	(ix86_expand_unop1_builtin): Likewise.
	(ix86_expand_sse_compare): Likewise.
	(ix86_expand_sse_comi): Likewise.
	(ix86_expand_vec_init_builtin): Likewise.
	(ix86_expand_vec_ext_builtin): Likewise.
	(ix86_expand_vec_set_builtin): Likewise.
	(ix86_expand_builtin): Use new CALL_EXPR accessors.

	* config/sh/sh.c (sh_expand_builtin): Use new CALL_EXPR accessors.
	* config/c4x/c4x.c (c4x_expand_builtin): Likewise.

	* config/iq2000/iq2000.c (expand_one_builtin): Pass entire CALL_EXPR
	instead of arglist.  Use new CALL_EXPR accessors.  Fix callers.
	(iq2000_expand_builtin): Use new CALL_EXPR accessors.

	* config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Use
	build_call_expr.
	* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Likewise.
	(rs6000_expand_unop_builtin): Pass entire CALL_EXPR instead of
	arglist.  Use new CALL_EXPR accessors.  Fix callers.
	(altivec_expand_abs_builtin): Likewise.
	(rs6000_expand_binop_builtin): Likewise.
	(altivec_expand_predicate_builtin): Likewise.
	(altivec_expand_lv_builtin): Likewise.
	(spe_expand_stv_builtin): Likewise.
	(altivec_expand_stv_builtin): Likewise.
	(rs6000_expand_ternop_builtin): Likewise.
	(altivec_expand_ld_builtin): Use new CALL_EXPR accessors.
	(altivec_expand_st_builtin): Likewise.
	(altivec_expand_dst_builtin): Likewise.
	(altivec_expand_vec_init_builtin): Pass entire CALL_EXPR instead of
	arglist.  Use new CALL_EXPR accessors.  Fix callers.
	(altivec_expand_vec_set_builtin): Likewise.
	(altivec_expand_vec_ext_builtin): Likewise.
	(altivec_expand_builtin): Use new CALL_EXPR accessors.
	(spe_expand_builtin): Likewise.
	(spe_expand_predicate_builtin): Pass entire CALL_EXPR instead of
	arglist.  Use new CALL_EXPR accessors.  Fix callers.
	(spe_expand_evsel_builtin): Likewise.
	(rs6000_expand_builtin): Use new CALL_EXPR accessors.  VCFUX and
	FCFSX cases must construct whole new CALL_EXPR, not just arglist.

	* config/arm/arm.c (arm_expand_binop_builtin): Pass entire CALL_EXPR
	instead of arglist.  Use new CALL_EXPR accessors.  Fix callers.
	(arm_expand_unop_builtin): Likewise.
	(arm_expand_builtin): Use new CALL_EXPR accessors.

	* config/mips/mips.c (mips_expand_builtin):  Use new CALL_EXPR
	accessors.

	* config/bfin/bfin.c (bfin_expand_binop_builtin): Pass entire CALL_EXPR
	instead of arglist.  Use new CALL_EXPR accessors.  Fix callers.
	(bfin_expand_unop_builtin): Likewise.
	(bfin_expand_builtin): Use new CALL_EXPR accessors.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* c-semantics.c (build_stmt): Add internal diagnostic check.

	* c-pretty-print.c (pp_c_postfix_expression): Use new CALL_EXPR
	accessors.  Print arguments explicitly instead of as a list.

	* c-typeck.c (build_function_call): Use new CALL_EXPR constructors.

	* c-omp.c (c_finish_omp_barrier): Use build_call_expr.
	(c_finish_omp_flish): Likewise.

	* c-common.c (verify_tree): Use new CALL_EXPR accessors.  Traverse
	arguments explicitly instead of as a list.  Use TREE_OPERAND_LENGTH
	instead of TREE_CODE_LENGTH.
	(check_function_arguments_recurse): Use new CALL_EXPR accessors.
	(c_warn_unused_result): Likewise.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
	Change class to tcc_vl_exp.

	* call.c (build_call): Use build_call_list instead 
	of build3. 
	(build_over_call): Likewise.
	(build_new_method_call): Use build_min_non_dep_call_list 
	instead of build_min_non_dep.

	* error.c (dump_call_expr_args): New function.
	(dump_aggr_init_expr_args): New function.
	(dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. 
	Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.

	* cvt.c (convert_to_void): Use build_call_array instead
	of build3; use new AGGR_INIT_EXPR accessor macros.

	* mangle.c (write_expression): Use TREE_OPERAND_LENGTH
	instead of TREE_CODE_LENGTH.

	* dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
	AGGR_INIT_EXPR accessor macros.

	* cp-gimplify.c (cp_gimplify_init_expr): Use 
	AGGR_INIT_EXPR_SLOT to set the slot operand.

	* cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
	(AGGR_INIT_EXPR_SLOT): New macro.
	(AGGR_INIT_EXPR_ARG): New macro.
	(aggr_init_expr_nargs): New macro.
	(AGGR_INIT_EXPR_ARGP): New macro.
	(aggr_init_expr_arg_iterator): New.
	(init_aggr_init_expr_arg_iterator): New.
	(next_aggr_init_expr_arg): New.
	(first_aggr_init_expr_arg): New.
	(more_aggr_init_expr_args_p): New.
	(FOR_EACH_AGGR_INIT_EXPR_ARG): New.
	(stabilize_aggr_init): New declaration.
	(build_min_non_dep_call_list): Likewise.

	* tree.c (process_aggr_init_operands): New function.
	(build_aggr_init_array) New function.
	(build_cplus_new): Update to use new CALL_EXPR and
	AGGR_INIT_EXPR accessor macros. Replace use of build3 with
	build_aggr_init_array.
	(build_min_non_dep_call_list) New function.
	(build_min_nt): Assert input code parameter is not a variable
	length expression class.
	(build_min, build_min_non_dep): Likewise.
	(cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
	to check for equality instead of recursing. Handle tcc_vl_exp
	tree code classes.
	(stabilize_call): Update to only handle CALL_EXPRs, not 
	AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
	(stabilize_aggr_init): New function.
	(stabilize_init): Use it.

	* cxx-pretty-print.c (pp_cxx_postfix_expression)
	<AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
	AGGR_INIT_EXPR accessor macros and argument iterators.
	
	* pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
	build_vl_exp. Iterate through the operands, recursively 
	processing each one.
	(tsubst_copy_and_build) <CALL_EXPR>: Update to use new
	CALL_EXPR accessor macros.
	(value_dependent_expression_p) <default>: Handle tcc_vl_exp
	tree code classes. Use TREE_OPERAND_LENGTH instead of 
	TREE_CODE_LENGTH.

	* semantics.c (finish_call_expr): Use build_nt_call_list
	instead of build_nt.
	(simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR 
	accessor macros. Use build_call_array to construct the 
	CALL_EXPR node instead of build3
	
	* decl2.c (build_offset_ref_call_from_tree): Use 
	build_nt_call_list and build_min_non_dep_call_list instead
	of build_min_nt and build_min_non_dep.

	* parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
	Use build_nt_call_list instead of build_min_nt.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
	of build3.
	(BUILD_MONITOR_EXIT): Likewise.

	* java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
	(java_gimplify_modify_expr): Likewise.

	* class.c (cache_this_class_ref): Use build_call_expr.
	(build_static_field_ref): Likewise.
	(emit_indirect_register_classes): Likewise.
	(emit_register_classes): Likewise.

	* resource.c (write_resource_constructor): Use build_call_expr.

	* builtins.c (builtin_creator_function): Change interpretation of
	the second parameter to be the whole CALL_EXPR instead of the arglist.
	(max_builtin): Tweak parameter list.  Use new CALL_EXPR accessors.
	(min_builtin): Likewise.
	(abs_builtin): Likewise.
	(java_build_function_call_expr): Likewise.
	(convert_real): Likewise.
	(UNMARSHAL3): Likewise.
	(UNMARSHAL4): Likewise.
	(UNMARSHAL5): Likewise.
	(build_arglist_for_builtin): Delete.  Fix callers to use
	build_call_expr instead.
	(putObject_builtin): Tweak parameter list.  Use new CALL_EXPR
	accessors.
	(compareAndSwapInt_builtin): Likewise.
	(compareAndSwapLong_builtin): Likewise.
	(compareAndSwapObject_builtin): Likewise.
	(putVolatile_builtin): Likewise.
	(getVolatile_builtin): Likewise.
	(VMSupportsCS8_builtin): Likewise.
	(check_for_builtin): Pass entire CALL_EXPR to builtin expander
	instead of arglist.

	* expr.c (build_java_athrow): Use build_call_nary instead of build3.
	(build_java_throw_out_of_bounds_exception): Likewise.
	(java_check_reference): Likewise.
	(build_java_arraystore_check): Likewise.
	(build_newarray): Likewise.
	(build_anewarray): Likewise.
	(expand_java_multinewarray): Use build_call_list instead of build3.
	(build_java_monitor): Use build_call_nary instead of build3.
	(java_create_object): Likewise.
	(expand_java_NEW): Likewise.
	(build_instanceof): Likewise.
	(expand_java_CHECKCAST): Likewise.
	(build_java_soft_divmod): Likewise.
	(build_java_binop): Likewise.
	(build_field_ref): Likewise.
	(build_class_init): Likewise.
	(rewrite_arglist_getcaller): Use build_call_expr.
	(build_invokeinterface):  Use build_call_nary instead of build3.
	(expand_invoke): Use build_call_list instead of build3.
	(build_jni_stub): Use build_call_nary, build_call_list, or
	build_call_expr instead	of build3.
	(expand_java_field_op): Use build_call_expr instead of build3.
	(force_evaluation_order): Use new CALL_EXPR accessors.

	* lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* objc-act.c (receiver_is_class_object): Use new CALL_EXPR accessors.
	(objc_get_callee_fndecl): Likewise.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* trans-expr.c (gfc_conv_power_op): Use build_call_expr.
	(gfc_conv_string_tmp): Likewise.
	(gfc_conv_concat_op): Likewise.
	(gfc_build_compare_string): Likewise.
	(gfc_conv_function_call): Use build_call_list instead of build3.

	* trans-array.c (gfc_trans_allocate_array_storage): Use
	build_call_expr.
	(gfc_grow_array): Likewise.
	(gfc_trans_array_ctor_element): Likewise.
	(gfc_trans_array_constructor_value): Likewise.
	(gfc_array_allocate): Likewise.
	(gfc_array_deallocate): Likewise.
	(gfc_trans_auto_array_allocation): Likewise.
	(gfc_trans_dummy_array_bias): Likewise.
	(gfc_conv_array_parameter): Likewise.
	(gfc_trans_dealloc_allocated): Likewise.
	(gfc_duplicate_allocatable): Likewise.

	* trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
	(gfc_trans_omp_flush): Likewise.

	* trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
	(gfc_trans_pause): Likewise.
	(gfc_trans_stop): Likewise.
	(gfc_trans_character_select): Likewise.
	(gfc_do_allocate): Likewise.
	(gfc_trans_assign_need_temp): Likewise.
	(gfc_trans_pointer_assign_need_temp): Likewise.
	(gfc_trans_forall_1): Likewise.
	(gfc_trans_where_2): Likewise.
	(gfc_trans_allocate): Likewise.
	(gfc_trans_deallocate): Likewise.

	* trans.c (gfc_trans_runtime_check): Use build_call_expr.

	* trans-io.c (gfc_trans_open): Use build_call_expr.
	(gfc_trans_close): Likewise.
	(build_filepos): Likewise.
	(gfc_trans_inquire): Likewise.
	(NML_FIRST_ARG): Delete.
	(NML_ADD_ARG): Delete.
	(transfer_namelist_element): Use build_call_expr.
	(build_dt): Likewise.
	(gfc_trans_dt_end): Likewise.
	(transfer_expr): Likewise.
	(transfer_array-desc): Likewise.

	* trans-decl.c (gfc_generate_function_code): Use build_call_expr.
	(gfc_generate_constructors): Likewise.

	* trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
	(gfc_conv_intrinsic_fdate): Likewise.
	(gfc_conv_intrinsic_ttynam): Likewise.
	(gfc_conv_intrinsic_array_transfer): Likewise.
	(gfc_conv_associated): Likewise.
	(gfc_conv_intrinsic_si_kind): Likewise.
	(gfc_conv_intrinsic_trim): Likewise.
	(gfc_conv_intrinsic_repeat: Likewise.
	(gfc_conv_intrinsic_iargc): Likewise.

Co-Authored-By: Brooks Moses <brooks.moses@codesourcery.com>
Co-Authored-By: Lee Millward <lee.millward@codesourcery.com>

From-SVN: r122018
2007-02-15 18:50:49 -05:00
Andrew Pinski 7122aa3b32 re PR objc/27438 ([unit-at-a-time] '_OBJC_INSTANCE_0' defined but not used warning)
2007-01-23  Andrew Pinski  <pinskia@gmail.com>

        PR objc/27438
        * objc-act.c (objc_add_static_instance): Mark the decl as
        TREE_USED.

2007-01-23  Andrew Pinski  <pinskia@gmail.com>

        PR objc/27438
        * objc.dg/const-str-12.m: New test.

From-SVN: r121102
2007-01-23 22:01:09 -08:00
Andrew Pinski d2f9f9a62d re PR objc/30479 (Precompiled headers don't seem to work with GNU ObjC)
2007-01-20  Andrew Pinski  <pinskia@gmail.com>

        PR objc/30479
        * objc-act.c (hash_interface): Use IDENTIFIER_HASH_VALUE instead
        of htab_hash_pointer.
        (lookup_interface): Likewise.
        (add_class): Likewise.

2007-01-20  Andrew Pinski  <pinskia@gmail.com>

        PR objc/30479
        * objc.dg/pch: New directory.
        * objc.dg/pch/pch.exp: New file.
        * objc.dg/pch/interface-1.m: New test.
        * objc.dg/pch/interface-1.hs: New include file.
        * lib/objc.exp (objc_target_compile): Add
        "-x objective-c-header" in front of the sources if this is
        a precompiled header being compiled.

From-SVN: r121024
2007-01-20 22:51:07 -08:00
Paolo Bonzini 8b1f719ae7 configure.ac (strict1_warn): Rename to strict_warn.
2007-01-11  Paolo Bonzini  <bonzini@gnu.org>

	* configure.ac (strict1_warn): Rename to strict_warn.
	(WERROR, --enable-werror, symlink hacks, stage1_cflags,
	cc_set_by_configure, quoted_cc_set_by_configure,
	stage_prefix_set_by_configure, quoted_stage_prefix_set_by_configure,
	all_boot_languages, all_stagestuff): Remove.
	(target_list): Remove bootstrap targets.
	* Makefile.in (quickstrap): Unconditionally make a synonym of all.
	(BOOT_LANGUAGES, STAGE1_CFLAGS, STAGE1_CHECKING,
	REMAKEFLAGS, FLAGS_TO_PASS, PREPEND_DOTDOT_TO_RELATIVE_PATHS,
	SUBDIR_FLAGS_TO_PASS, WERROR_FLAGS, STRICT2_WARN, LANG_STAGESTUFF,
	VOL_FILES, POSTSTAGE1_FLAGS_TO_PASS, STAGE2_FLAGS_TO_PASS,
	STAGEPROFILE_FLAGS_TO_PASS, STAGEFEEDBACK_FLAGS_TO_PASS, stage1_build,
	stage1_copy, stage2_build, stage2_copy, stageprofile_build,
	stageprofile_copy, stage3_build, stage3_copy, stagefeedback_build,
	stagefeedback_copy, stage4_build, clean_s1, clean_sw, bootstrap,
	bootstrap-lean, bootstrap2, bootstrap2-lean, bootstrap3,
	bootstrap3-lean, bootstrap4, bootstrap4-lean, unstage1, unstage2,
	unstage3, unstage4, unstageprofile, unstagefeedback, restage, restage2,
	restage3, restage4, restageprofile, restagefeedback, bubbleestrap,
	cleanstrap, unstrap, restrap, *compare, *compare3, *compare4,
	*compare-lean, *compare3-lean, *compare4-lean, stage1-start, stage1,
	stage2-start, stage2, stage3-start, stage3, stage4-start, stage4,
	stageprofile-start, stageprofile, stagefeedback-start, stagefeedback,
	risky-stage1, risky-stage2, risky-stage3, risky-stage4): Remove.
	(ORDINARY_FLAGS_TO_PASS): Rename to FLAGS_TO_PASS.
	(STAGECOPYSTUFF, STAGEMOVESTUFF): Consolidate into MOSTLYCLEANFILES.
	(mostlyclean): Adjust.
	(clean, distclean): Don't mention bootstrap stuff.
	* configure: Regenerate.
	* ada/config-lang.in, cp/config-lang.in, forttran/config-lang.in,
	java/config-lang.in, objc/config-lang.in, objcp/config-lang.in,
	treelang/config-lang.in (stagestuff): Remove.
	* doc/sourcebuild.texi (stage1, stage2, stage3, stage4,
	stageprofile, stagefeedback, stagestuff): Remove mention.

From-SVN: r120670
2007-01-11 10:49:30 +00:00
Douglas Gregor 06d40de8bb c-common.c (c_common_nodes_and_builtins): Since variants of void_type_node get built before it is given a name...
2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>

	* c-common.c(c_common_nodes_and_builtins): Since variants of
	void_type_node get built before it is given a name, we need to
	give those variants the name, too. 
	(complete_array_type): We need to work with the canonical main
	type of the array, from which we will build the qualified version.
	* params.def (PARAM_VERIFY_CANONICAL_TYPES): New.
	* print-tree.c (print_node): Display canonical type information
	for each type.
	* stor-layout.c (layout_type): When we don't know the
	alignment of a type for which we're building an array, we end up
	guessing wrong, so make the type require structural equality.
	* tree.c (make_node_stat): When we build a new type, it is its
	own canonical type.
	(build_type_attribute_qual_variant): When building an attribute
	variant, its canonical type is the non-attribute variant. However,
	if the attributes are target-dependent and they differ, we need to
	use structural equality checks for this type.
	(build_qualified_type): A qualified type is not equivalent to its
	unqualified variant; set the canonical type appropriately.
	(build_distinct_type_copy): When building a distinct type from
	another type, the new type is its own canonical type.
	(build_variant_type_copy): When building a new type variant, we
	assume that it is equivalent to the original type.
	(build_pointer_type_for_mode): When building a pointer type, also
	build a canonical type pointer.
	(build_reference_type_for_mode): When building a reference type,
	also build a canonical type reference.
	(build_index_type): When we can't hash an index type (e.g.,
	because its maximum value is negative), the index type requires
	structural equality tests.
	(build_array_type): Build the canonical form of an array type.
	(build_function_type): Function types require structural equality,
	because they contain default arguments, attributes, etc. 
	(build_method_type_directly): Ditto for method types.
	(build_offset_type): Build the canonical offset type.
	(build_complex_type): Build the canonical vector type.
	(make_vector_type): Build the canonical vector type.
	* tree.h (TYPE_CANONICAL): New.
	(TYPE_STRUCTURAL_EQUALITY_P): New.
	(SET_TYPE_STRUCTURAL_EQUALITY): New.
	(struct tree_type): Added "canonical" field.
	* params.h (VERIFY_CANONICAL_TYPES): New.
	* doc/c-tree.texi (TYPE_CANONICAL): Document.
	(TYPE_STRUCTURAL_EQUALITY_P): Document.
	(SET_TYPE_STRUCTURAL_EQUALITY): Document.
	* doc/invoke.texi (verify-canonical-types): Document --param
	parameter for verifying canonical types.
	
2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>

	* typeck.c (structural_comptypes): Renamed from "comptypes".
	(comptypes): Use canonical type information to perform fast type
	comparison. When VERIFY_CANONICAL_TYPES, verify that the
	canonical type comparison returns the same results as we would see
	from the current, structural check. Support COMPARE_STRUCTURAL
	when we need structural checks.
	* decl.c (typename_compare): Fix comment.
	(build_typename_type): TYPENAME_TYPE nodes require structural
	equality checks, because they resolve different based on the
	current class type.
	(make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
	require structural equality checks (for now).
	(build_ptrmemfunc_type): Build the canonical pointer to member
	function type.
	(compute_array_index_type): Whenever we build a new index type
	to represent the size of an array in a template, we need to mark
	this index type as requiring structural equality. This goes for
	arrays with value-dependent sizes with the current ABI, or all
	arrays with ABI-1.
	* tree.c (cplus_array_hash): New.
	(struct cplus_array_info): New.
	(cplus_array_compare): New.
	(cplus_array_htab): New.
	(build_cplus_array_type_1): Use a hash table to cache the array
	types we build. Build the canonical array type for each array
	type.
	(cp_build_qualified_type_real): When building a cv-qualified array
	type, use the hash table of array types and build canonical array
	types as necessary.
	(bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
	use structural equality (for now).
	* cp-tree.h (COMPARE_STRUCTURAL): New.
	* pt.c (canonical_template_parms): New.
	(canonical_type_parameter): New.
	(process_template_parm): Find the canonical type parameter.
	(lookup_template_class): When we have named the primary template
	type, set the canonical type for our template class to the primary
	template type. If any of the template arguments need structural
	equality checks, the template class needs structural equality
	checks.
	(tsubst): When reducing the level of a template template
	parameter, we require structural equality tests for the resulting
	parameter because its template parameters have not had their types
	canonicalized. When reducing a template type parameter, find the
	canonical reduced type parameter.
	(any_template_arguments_need_structural_equality_p): New.

2007-01-02  Douglas Gregor  <doug.gregor@gmail.com>
	
	* objc-act.c (objc_build_volatilized_type): Keep track of
	canonical types.
	(objc_get_protocol_qualified_type): Ditto.

From-SVN: r120341
2007-01-02 14:23:26 +00:00
Andreas Tobler 88852cb512 objc-act.c (objc_finish_file): Remove ifdef clause for OBJCPLUS and content where we called cp_finish_file.
2006-11-02  Andreas Tobler  <a.tobler@schweiz.org>

	* objc-act.c (objc_finish_file): Remove ifdef clause for OBJCPLUS and
	content where we called cp_finish_file.

From-SVN: r118424
2006-11-02 21:03:40 +01:00
Rafael Ávila de Espíndola c79efc4d2a decl.c: Include langhooks.h.
* gcc/java/decl.c: Include langhooks.h.
       (builtin_function): Remove.
       (java_init_decl_processing): Replace calls to builtin_function
       with add_builtin_function.

       * gcc/java/Make-lang.in (jc1$(exeext)): Depend on and link with
       attribs.o.
       (java/decl.o): Depend on langhooks.h.

       * gcc/java/java-tree.h (builtin_function): Remove.

       * gcc/tree.c (local_define_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/objc/objc-act.c (synth_module_prologue): Replace calls to
       builtin_function with add_builtin_function.
       (build_next_objc_exception_stuff): Replace calls to
       builtin_function with add_builtin_function.
       (build_objc_exception_stuff): Replace calls to
       builtin_function with add_builtin_function.

       * gcc/objcp/objcp-decl.h (objcp_builtin_function): Remove.

       * gcc/cp/decl.c (builtin_function_1): Move common code to
       add_builtin_function.
       (builtin_function): Rename to cxx_builtin_function.
       Change the signature.

       * gcc/cp/call.c: Include langhooks.h.
       (build_java_interface_fn_ref):  Replace calls to
       builtin_function with add_builtin_function.

       * gcc/cp/Make-lang.in (cp/call.o): Depend on langhooks.h.

       * gcc/cp/cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
       cxx_builtin_function.

       * gcc/cp/cp-tree.h (builtin_function): Rename to cxx_builtin_function.
       Change the signature.

       * gcc/c-objc-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
       c_builtin_function.

       * gcc/c-tree.h (builtin_function): Rename to c_builtin_function. Change
       the signature.

       * gcc/ada/utils.c (builtin_function): Rename to gnat_builtin_function.
       Move common code to add_builtin_function.

       * gcc/ada/misc.c (LANG_HOOKS_BUILTIN_FUNCTION): Define as
       gnat_builtin_function.

       * gcc/ada/gigi.h (builtin_function): Rename to gnat_builtin_function.
       Change the signature.

       * gcc/c-decl.c (builtin_function): Rename to c_builtin_function. Move
       common code to add_builtin_function.

       * gcc/fortran/Make-lang.in (f951$(exeext)): Depend on and link with
       attribs.o.

       * gcc/fortran/trans.h (builtin_function): Rename to
       gfc_builtin_function. Change the signature.

       * gcc/fortran/f95-lang.c (LANG_HOOKS_BUILTIN_FUNCTION): Define as
       gfc_builtin_function.
       (builtin_function): Rename to gfc_builtin_function. Move common
       code to builtin_function.
       (gfc_define_builtin): Replace calls to builtin_function with
       gfc_define_builtin.

       * gcc/langhooks.c (add_builtin_function): New function.
       (lhd_builtin_function): New function.

       * gcc/langhooks.h (struct lang_hooks): Change the signature of
       builtin_function.
       (add_builtin_function): New function.

       * gcc/treelang/treetree.c (builtin_function): Remove.

       * gcc/tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Replace
       calls to lang_hooks.builtin_function with add_builtin_function.

       * gcc/c-common.c (decl_builtin_1): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/alpha/alpha.c (alpha_init_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/frv/frv.c (def_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/s390/s390.c (s390_init_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/sparc/sparc.c (def_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/i386/i386.c (def_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.
       (def_builtin): Replace calls to lang_hooks.builtin_function with
       add_builtin_function.

       * gcc/config/sh/sh.c (sh_media_init_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/c4x/c4x.c (c4x_init_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/stormy16/stormy16.c (xstormy16_init_builtins):
       Replace calls to lang_hooks.builtin_function with
       add_builtin_function.

       * gcc/config/iq2000/iq2000.c (def_builtin):
       Replace calls to lang_hooks.builtin_function with
       add_builtin_function.

       * gcc/config/ia64/ia64.c (def_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/rs6000/rs6000.c (def_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.
       (altivec_init_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/arm/arm.c (def_mbuiltin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.
       (arm_init_tls_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/mips/mips.c (mips_init_builtins): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/config/bfin/bfin.c (def_builtin): Replace calls to
       lang_hooks.builtin_function with add_builtin_function.

       * gcc/langhooks-def.h (lhd_builtin_function): New function.
       (LANG_HOOKS_BUILTIN_FUNCTION): Define as lhd_builtin_function.

From-SVN: r117981
2006-10-23 19:47:58 +00:00
Brooks Moses b5422ad772 --(top level)--------------------------------------------
2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Makefile.def: Added pdf target handling.
	* Makefile.tpl: Added pdf target handling.
	* Makefile.in: Regenerated.

---fixincludes--------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Makefile.in: Added empty "pdf" target.

---gcc----------------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* configure.ac: Added pdf to "Make-hooks"
	* Makefile.in: Added TEXI2PDF definition, and various pdf-file
	targets and *.pdf file patterns in cleanup targets.
	* configure: Regenerated.

---gcc/cp-------------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Make-lang.in: Added "c++.pdf" target support.

---gcc/fortran--------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Make-lang.in: Added "fortran.pdf", "gfortran.pdf" target
	support.

---gcc/java-----------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Make-lang.in: Added "java.pdf", "gcj.pdf" target support.

---gcc/objc-----------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Make-lang.in: Added empty "objc.pdf" target.

---gcc/objcp----------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Make-lang.in: Added empty "obj-c++.pdf" target.

---gcc/treelang-------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Make-lang.in: Added "treelang.pdf" target support.

---gnattools----------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Makefile.in: Added empty "pdf" target.

---libcpp-------------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Makefile.in: Added empty "pdf" target.

---libdecnumber-------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Makefile.in: Added empty "pdf" target.

---libiberty----------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Makefile.in: Added "pdf", "libiberty.pdf" target support.
	* testsuite/Makefile.in: Added empty "pdf" target.

---libobjc------------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Makefile.in: Added empty "pdf" target.

From-SVN: r117618
2006-10-10 16:48:09 -07:00
Andrew Pinski e91de072ad re PR objc/29195 (ICE in expand_expr_real_1, at expr.c:6932)
2006-09-26  Andrew Pinski  <pinskia@physics.uc.edu>

        PR objc/29195
        * objc-act.c (objc_push_parm): If we change the type of the
        decl, relayout the decl.
2006-09-26  Andrew Pinski  <pinskia@physics.uc.edu>

        PR objc/29195
        * objc/compile/method-1.m: New test.

From-SVN: r117229
2006-09-26 08:36:21 -07:00
Eric Christopher 64ee94908d tm.texi (OBJC_JBLEN): Describe.
2006-09-19  Eric Christopher  <echristo@apple.com>

        * doc/tm.texi (OBJC_JBLEN): Describe.
        * config/i386/darwin.h (OBJC_JBLEN): Define.
        * config/rs6000/darwin.h: Ditto.

2006-09-19  Eric Christopher  <echristo@apple.com>

        * objc-act.c (JBLEN): Rename to OBJC_JBLEN,
        default to something innocuous.
        (build_next_objc_exception_stuff): Rename JBLEN.

From-SVN: r117066
2006-09-19 23:56:17 +00:00
Volker Reichelt 48779194b7 Makefile.in: Use $(HEADER_H) instead of header.h in dependencies and variables used in...
* Makefile.in: Use $(HEADER_H) instead of header.h in dependencies
	and variables used in dependencies.

ada/ cp/ fortran/ java/ objc/ objcp/ treelang/

	* Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.

From-SVN: r115802
2006-07-28 23:45:11 +00:00
Volker Reichelt 7eb314dc4b re PR objc++/28434 (ICE with invalid protocol)
PR obj-c++/28434
	* objc-act.c (lookup_and_install_protocols): Skip error_mark_nodes.

	* obj-c++.dg/proto-error-1.mm: New test.

From-SVN: r115599
2006-07-19 19:56:29 +00:00
Mike Stump c713f9e498 * objc-act.c: Remove prototype for objc_build_volatilized_type.
From-SVN: r114427
2006-06-06 10:22:54 +00:00
Mike Stump 96e5d74557 Fix whitespacing
From-SVN: r114164
2006-05-28 01:01:12 +00:00
Mike Stump 1fb34f17ed * objc-act.c (build_next_objc_exception_stuff): Use JBLEN instead of _JBLEN.
From-SVN: r114053
2006-05-24 21:31:42 +00:00
Volker Reichelt b207220873 re PR objc/27240 (ICE with invalid fields)
PR objc/27240
	* objc-act.c (objc_is_public): Return early on invalid type.

	* objc.dg/member-1.m: New test.

From-SVN: r113559
2006-05-05 19:48:26 +00:00
Paolo Bonzini dedfa46611 re PR bootstrap/26500 (info/gfortran.info is no longer being installed)
2006-03-08  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/26500
	* Makefile.in (dvi, html, install-info): Invoke the corresponding
	language hook targets.
	* ada/Make-lang.in, cp/Make-lang.in, objc/Make-lang.in,
	objcp/Make-lang.in: Create stub rules for dvi, html, install-info
	if language hook targets were missing.

From-SVN: r111845
2006-03-08 16:10:44 +00:00
Fariborz Jahanian d349339d33 Fixed a couple of objctective-c bugs.
Oked by Mike Stump.

From-SVN: r111642
2006-03-02 17:45:30 +00:00
Rafael Espindola 9d29a5b779 Make-lang.in (OBJC): Remove
* gcc/objc/Make-lang.in (OBJC): Remove
              (OBJECTIVE-C): Remove
              (objective-c): Remove
              (.PHONY): Remove objective-c and ObjC
              * gcc/objcp/Make-lang.in (OBJ-C++): Remove
              (.PHONY): Remove Obj-c++ and obj-C++. Add obj-c++
              * gcc/cp/Make-lang.in (C++): Remove
              (.PHONY): Remove C++
              * gcc/ada/Make-lang.in (Ada): Remove
              (.PHONY): Remove Ada
              * gcc/fortran/Make-lang.in (FORTRAN): Remove
              (.PHONY): Remove F95 and f95. Add fortran
              * gcc/treelang/Make-lang.in (.phony): Remove TREELANG
              (TREELANG): Remove
              * gcc/Makefile.in (C): Remove
              (PROTO): Remove
              (.PHONY): Remove C and PROTO

From-SVN: r111307
2006-02-20 17:17:04 +00:00
Paolo Bonzini b2d7fd7bf8 configure.ac (target_list): Add install-info, dvi, html.
2006-02-20  Paolo Bonzini  <bonzini@gnu.org>

	* configure.ac (target_list): Add install-info, dvi, html.
	* configure: Regenerate.

	* ada/Make-lang.in, cp/Make-lang.in, fortran/Make-lang.in,
	java/Make-lang.in, objc/Make-lang.in, objcp/Make-lang.in,
	treelang/Make-lang.in: Do not use double-colon rules.

From-SVN: r111304
2006-02-20 14:50:08 +00:00
Marcin Dalecki 5ed6ace578 tree-vrp.c: Use XNEW/XCNEW allocation wrappers.
2006-01-31  Marcin Dalecki  <martin@dalecki.de>

	* tree-vrp.c: Use XNEW/XCNEW allocation wrappers.
	* regrename.c: Ditto.
	* tree-ssa-loop-im.c: Ditto.
	* tree-dump.c: Ditto.
	* tree-complex.c: Ditto.
	* genrecog.c: Ditto.
	* tree-ssa-threadupdate.c: Ditto.
	* tracer.c: Ditto.
	* java/class.c: Ditto.
	* java/jcf-parse.c: Ditto.
	* java/resource.c: Ditto.
	* java/except.c: Ditto.
	* java/jvspec.c: Ditto.
	* java/jcf-write.c: Ditto.
	* java/jcf-path.c: Ditto.
	* java/gjavah.c: Ditto.
	* java/zextract.c: Ditto.
	* java/jcf-io.c: Ditto.
	* java/jcf.h: Ditto.
	* java/buffer.c: Ditto.
	* java/lang.c: Ditto.
	* java/parse-scan.y: Ditto.
	* java/lex.c: Ditto.
	* java/lex.h: Ditto.
	* cfgloopmanip.c: Ditto.
	* postreload-gcse.c: Ditto.
	* tree-ssa-loop-manip.c: Ditto.
	* postreload.c: Ditto.
	* tree-ssa-loop-ch.c: Ditto.
	* loop.c: Ditto.
	* ipa-cp.c: Ditto.
	* cppspec.c: Ditto.
	* diagnostic.c: Ditto.
	* final.c: Ditto.
	* genoutput.c: Ditto.
	* gcc.c: Ditto.
	* cfghooks.c: Ditto.
	* cfgloopanal.c: Ditto.
	* objc/objc-act.c: Ditto.
	* gcov.c: Ditto.
	* genextract.c: Ditto.
	* genautomata.c: Ditto.
	* pretty-print.c: Ditto.
	* genemit.c: Ditto.
	* cgraphunit.c: Ditto.
	* flow.c: Ditto.
	* df-scan.c: Ditto.
	* haifa-sched.c: Ditto.
	* dominance.c: Ditto.
	* dbxout.c: Ditto.
	* tree-ssa-loop-ivopts.c: Ditto.
	* df-core.c: Ditto.
	* mode-switching.c: Ditto.
	* modulo-sched.c: Ditto.
	* graph.c: Ditto.
	* ipa-pure-const.c: Ditto.
	* cse.c: Ditto.
	* fix-header.c: Ditto.
	* web.c: Ditto.
	* tree-stdarg.c: Ditto.
	* ipa-utils.c: Ditto.
	* loop-init.c: Ditto.
	* ipa-inline.c: Ditto.
	* cfganal.c: Ditto.
	* global.c: Ditto.
	* alloc-pool.c: Ditto.
	* dwarf2out.c: Ditto.
	* opts.c: Ditto.
	* genattrtab.c: Ditto.
	* tree-ssa-loop-ivcanon.c: Ditto.
	* predict.c: Ditto.
	* timevar.c: Ditto.
	* lcm.c: Ditto.
	* fortran/gfortranspec.c: Ditto.
	* regmove.c: Ditto.
	* local-alloc.c: Ditto.
	* langhooks.c: Ditto.
	* function.c: Ditto.
	* tree-vectorizer.c: Ditto.
	* gcse.c: Ditto.
	* ipa-type-escape.c: Ditto.
	* alias.c: Ditto.
	* tree-if-conv.c: Ditto.
	* profile.c: Ditto.
	* ipa.c: Ditto.
	* tree-data-ref.c: Ditto.
	* loop-unroll.c: Ditto.
	* treelang/treetree.c: Ditto.
	* calls.c: Ditto.
	* bt-load.c: Ditto.
	* ggc-common.c: Ditto.
	* except.c: Ditto.
	* coverage.c: Ditto.
	* cselib.c: Ditto.
	* tree-cfgcleanup.c: Ditto.
	* tree-ssa-pre.c: Ditto.
	* cfgcleanup.c: Ditto.
	* loop-invariant.c: Ditto.
	* loop-iv.c: Ditto.
	* ipa-prop.c: Ditto.
	* print-tree.c: Ditto.
	* conflict.c: Ditto.
	* ggc-page.c: Ditto.
	* sched-deps.c: Ditto.
	* regclass.c: Ditto.
	* tree-object-size.c: Ditto.
	* combine.c: Ditto.
	* bb-reorder.c: Ditto.
	* resource.c: Ditto.
	* var-tracking.c: Ditto.
	* cfgloop.c: Ditto.
	* df-problems.c: Ditto.
	* reg-stack.c: Ditto.
	* tlink.c: Ditto.
	* gccspec.c: Ditto.
	* sched-rgn.c: Ditto.
	* tree-ssa-structalias.c: Ditto.
	* tree-ssa-reassoc.c: Ditto.
	* config/darwin-c.c: Ditto.
	* config/darwin.c: Ditto.
	* config/arm/arm.c: Ditto.
	* cfgrtl.c: Ditto.
	* collect2.c: Ditto.
	* reload1.c: Ditto.

From-SVN: r110446
2006-01-31 20:56:55 +01:00
Andrew Pinski 06b1145579 re PR objc/25360 (Complex types are not encoded)
2005-12-14  Andrew Pinski  <pinskia@physics.uc.edu>

        PR objc/25360
        * objc/objc-act.c (encode_type): Encode Complex types as 'j' followed
        by the inner type.

2005-12-14  Andrew Pinski  <pinskia@physics.uc.edu>

        PR objc/25360
        * objc/objc-api.c (_C_COMPLEX): New define.
        * encoding.c (objc_sizeof_type): Handle _C_Complex.
        (objc_alignof_type): Likewise.
        (objc_skip_typespec): Likewise.

From-SVN: r108675
2005-12-16 12:19:37 -08:00
Andrew Pinski 6b990f0dd7 re PR objc/25348 (ICE encoding zero sized struct array)
2005-12-12  Andrew Pinski  <pinskia@physics.uc.edu>

        PR objc/25348
        * objc-act.c (encode_array): Handle arrays to zero sized types.
2005-12-12  Andrew Pinski  <pinskia@physics.uc.edu>

        PR objc/25348
        * objc.dg/encode-9.m: New test.

From-SVN: r108432
2005-12-12 15:58:16 -08:00
Rafael Ávila de Espíndola bd97af0659 sourcebuild.texi (all.build, [...]): Remove.
gcc/
	* doc/sourcebuild.texi (all.build, install-normal): Remove.
	* configure.ac: Remove all.build and install-normal from target_list
	* configure: Regenerate.
	* Makefile.in (install): Don't depend on install-normal.
gcc/java/
	* Make-lang.in (java.all.build, java.install-normal): Remove.
gcc/objc/
	* Make-lang.in (objc.all.build, objc.install-normal): Remove.
gcc/objcp/
	* Make-lang.in (obj-c++.all.build, obj-c++.install-normal): Remove.
gcc/cp/
	* Make-lang.in (c++.all.build, c++.install-normal): Remove.
gcc/ada/
	* Make-lang.in (ada.install-normal): Remove.
gcc/fortran/
	* Make-lang.in (fortran.all.build, fortran.install-normal): Remove.
gcc/treelang/
	* Make-lang.in (treelang.all.build, treelang.install-normal): Remove.

From-SVN: r108158
2005-12-07 22:10:30 +10:30