Commit Graph

1199 Commits

Author SHA1 Message Date
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
Alan Modra 2f4d2d181a gty.texi: Remove instructions for adding a dependency on s-gtype.
gcc/
	* doc/gty.texi: Remove instructions for adding a dependency on s-gtype.
	* Makefile.in: Add code to compute some dependencies on s-gtype
	automatically.  Remove the declaration of those dependencies.
gcc/java/
	* Make-lang.in: Remove all dependencies on s-gtype, except for
	gt-java-parse.h.
gcc/objc/
	* Make-lang.in: Remove all dependencies on s-gtype.
gcc/objcp/
	* Make-lang.in: Remove all dependencies on s-gtype.
gcc/cp/
	* Make-lang.in: Remove all dependencies on s-gtype.
gcc/ada/
	* Make-lang.in: Remove all dependencies on s-gtype.
gcc/fortran/
	* Make-lang.in: Remove all dependencies on s-gtype, except for
	gt-fortran-trans.h.
gcc/treelang/
	* Make-lang.in: Remove all dependencies on s-gtype.

From-SVN: r108155
2005-12-07 21:52:18 +10:30
Mike Stump 3a222eaea2 Fixup some spacing
From-SVN: r107973
2005-12-03 00:20:15 +00:00
Richard Guenther 9b282d7722 objc-act.c (objc_build_exc_ptr, [...]): Use buildN instead of build.
2005-12-02  Richard Guenther  <rguenther@suse.de>

	* objc-act.c (objc_build_exc_ptr, next_sjlj_build_enter_and_setjmp
	next_sjlj_build_exc_extract, next_sjlj_build_catch_list,
	next_sjlj_build_try_catch_finally, objc_begin_catch_clause,
	build_objc_method_call, objc_rewrite_function_call): Use buildN
	instead of build.

From-SVN: r107902
2005-12-02 17:03:17 +00:00
Geoffrey Keating e9bf587a8f Index: objc/ChangeLog
2005-10-20  Geoffrey Keating  <geoffk@apple.com>

	* objc-act.c (synth_module_prologue): Clear TREE_NOTHROW
	on objc_msgSend and like builtin functions.

Index: testsuite/ChangeLog
2005-10-20  Geoffrey Keating  <geoffk@apple.com>

	* obj-c++.dg/except-1.mm: New.

From-SVN: r105704
2005-10-21 01:28:58 +00:00
Andreas Krebbel 15c85bc270 objc-act.c (objc_build_component_ref): Adjust call to finish_class_member_access_expr due to a changed prototype.
2005-10-17  Andreas Krebbel  <krebbel1@de.ibm.com>

	* objc-act.c (objc_build_component_ref): Adjust call to
	finish_class_member_access_expr due to a changed prototype.

From-SVN: r105503
2005-10-17 14:51:03 +00:00
Andrew Pinski 04885a24b0 re PR objc/23306 ([unit-at-a-time] objc exceptions (GNU runtime) don't work with unit-at-a-time)
2005-08-31  Andrew Pinski  <pinskia@physics.uc.edu>

        PR objc/23306
        * objc-act.c (generate_strings): Remove and move code to
        finish decl to ...
        (add_objc_string): here when creating a new string decl.
        (finish_objc): Don't call generate_strings.

2005-08-31  Andrew Pinski  <pinskia@physics.uc.edu>

        PR objc/23306
        * objc.dg/image-info.m: Remove "objc_module_info" check part of the
        scan-assmbler.

From-SVN: r103713
2005-08-31 18:32:10 -07:00
Andrew Pinski eb6b2571f3 re PR objc/23381 (Next runtime objc exceptions are broken)
2005-08-31  Andrew Pinski  <pinskia@physics.uc.edu>

        PR objc/23381
        * objc-act.c (next_sjlj_build_try_catch_finally): Set
        TREE_SIDE_EFFECTS on catch_seq after building it.

From-SVN: r103658
2005-08-30 21:48:41 -07:00
Andrew Pinski 4e7feced54 part of PR objc/21992
2005-08-09  Andrew Pinski  <pinskia@physics.uc.edu>

        part of PR objc/21992
        * objc-act.c (handle_class_ref): The ref decl is always referenced.

From-SVN: r102920
2005-08-09 10:53:25 -07:00
Giovanni Bajo 4038c495fc Make CONSTRUCTOR use VEC to store initializers.
* c-common.c (complete_array_type): Update to cope with VEC in
	CONSTRUCTOR_ELTS.
	* c-pretty-print.c (pp_c_initializer_list): Use pp_c_constructor_elts.
	(pp_c_constructor_elts): New function.
	* c-pretty-print.h (pp_c_constructor_elts): Declare.
	* c-typeck.c (build_function_call, build_c_cast, digest_init,
	struct constructor_stack, struct initializer_stack,
	constructor_elements, push_init_level, pop_init_level,
	add_pending_init, find_init_member, output_init_element): Update to
	cope with VEC in CONSTRUCTOR_ELTS.
	* coverage.c (build_fn_info_value, build_ctr_info_value,
	build_gcov_info): Likewise.
	* expr.c (categorize_ctor_elements_1, store_constructor,
	expand_expr_real_1): Likewise.
	* fold-const.c (fold_ternary): Likewise.
	* gimplify.c (gimplify_init_ctor_preeval, zero_sized_field_decl,
	gimplify_init_constructor, gimplify_expr): Likewise.
	* tree-dump.c (dequeue_and_dump): Likewise.
	* tree-inline.c (copy_tree_r): Add code to duplicate a CONSTRUCTOR
	node.
	* tree-pretty-print.c (dump_generic_node): Update to cope with VEC in
	CONSTRUCTOR_ELTS.
	* tree-sra.c (generate_element_init_1): Likewise.
	* tree-ssa-ccp.c (fold_const_aggregate_ref): Likewise.
	* tree-ssa-operands.c (get_expr_operands): Likewise.
	* tree-vect-generic.c (expand_vector_piecewise): Likewise.
	* tree-vect-transform.c (vect_get_vec_def_for_operand):
	(get_initial_def_for_reduction): Likewise.
	* tree-vn.c (set_value_handle, get_value_handle): CONSTURCTOR uses
	value handle in annotations.
	* tree.c (tree_node_kind, tree_code_size, make_node_stat,
	tree_node_structure): Add support for constr_kind.
	(build_vector_from_ctor, build_constructor_single,
	build_constructor_from_list): New functions.
	(build_constructor): Update to take a VEC instead of a TREE_LIST.
	(simple_cst_equal, iterative_hash_expr, initializer_zerop, walk_tree):
	Update to cope with VEC in CONSTRUCTOR_ELTS.
	* tree.def (CONSTRUCTOR): Make it a tcc_exceptional node.
	* tree.h (FOR_EACH_CONSTRUCTOR_VALUE, FOR_EACH_CONSTRUCTOR_ELT,
	CONSTRUCTOR_APPEND_ELT): New macros.
	(struct constructor_elt, struct	tree_constructor): New data types.
	(union tree_node): Add tree_constructor field.
	* treestruct.def: Define TS_CONSTRUCTOR.
	* varasm.c (const_hash_1, compare_constant, copy_constant,
	compute_reloc_for_constant, output_addressed_constants,
	initializer_constant_valid_p, output_constant,
	array_size_for_constructor, output_constructor): Update to cope with
	VEC in CONSTRUCTOR_ELTS.
	* vec.h (VEC_empty, VEC_copy): New macros.

ada/
	Make CONSTRUCTOR use VEC to store initializers.
	* decl.c (gnat_to_gnu_entity): Update to cope with VEC in
	CONSTRUCTOR_ELTS.
	* trans.c (extract_values): Likewise.
	* utils.c (convert, remove_conversions): Likewise.
	* utils2.c (contains_save_expr_p, build_binary_op, build_unary_op,
	gnat_build_constructor): Likewise.

cp/
	Make CONSTRUCTOR use VEC to store initializers.
	* call.c (convert_default_arg): Update call to digest_init.
	* class.c (dump_class_hierarchy, dump_array): Update to cope with
	VEC in CONSTRUCTOR_ELTS.
	* cp-tree.h (EMPTY_CONSTRUCTOR_P): Likewise.
	(finish_compound_literal, digest_init): Update declaration.
	* decl.c (struct reshape_iter): New data type.
	(reshape_init_array): Rename to...
	(reshape_init_array_1): Update to cope with VEC in CONSTRUCTOR_ELTS.
	(reshape_init): Rewrite from scratch. Split parts into...
	(reshape_init_array, reshape_init_vector, reshape_init_class,
	reshape_init_r): New functions.
	(check_initializer): Update call to reshape_init. Remove obsolete
	code.
	(initialize_artificial_var, cp_complete_array_type): Update to cope
	with VEC in CONSTRUCTOR_ELTS.
	* decl2.c (grokfield): Update calls to digest_init.
	(mark_vtable_entries): Update to cope with VEC in CONSTRUCTOR_ELTS.
	* error.c (dump_expr_init_vec): New function.
	(dump_expr): Use dump_expr_init_vec.
	* init.c (build_zero_init, build_vec_init): Update to cope with VEC
	in CONSTRUCTOR_ELTS.
	(expand_default_init): Update call to digest_init.
	* parser.c  (cp_parser_postfix_expression): Use a VEC for the
	initializers.
	(cp_parser_initializer_list): Build a VEC of initializers.
	* pt.c (tsubst_copy, tsubst_copy_and_build): Update to cope with VEC
	in CONSTRUCTOR_ELTS.
	* rtti.c (tinfo_base_init, generic_initializer, ptr_initializer,
	ptm_initializer, class_initializer, get_pseudo_ti_init): Use
	build_constructor_from_list instead of build_constructor.
	* semantics.c (finish_compound_literal): Update call to digest_init.
	* tree.c (stabilize_init): Update to cope with VEC in
	CONSTRUCTOR_ELTS.
	* typeck.c (build_ptrmemfunc1): Likewise.
	* typeck2.c: (cxx_incomplete_type_error, split_nonconstant_init_1):
	Likewise.
	(store_init_value): Use build_constructor_from_list and update call
	to digest_init.
	(digest_init): Rewrite.
	(process_init_constructor): Rewrite from scratch. Split into...
	(process_init_constructor_array, picflag_from_initializer,
	process_init_constructor_record, process_init_constructor_union):
	New functions.
	(PICFLAG_ERRONEOUS, PICFLAG_NOT_ALL_CONSTANT, PICFLAG_NOT_ALL_SIMPLE):
	New macros.
	(build_functional_cast): Use build_constructor_from_list instead of
	build_constructor.

fortran/
	Make CONSTRUCTOR use VEC to store initializers.
	* trans-array.c (gfc_build_null_descriptor,
	gfc_trans_array_constructor_value, gfc_conv_array_initializer):
	Update to cope with VEC in CONSTRUCTOR_ELTS.
	* trans-common.c (create_common): Likewise.
	* trans-expr.c (gfc_conv_structure): Likewise.
	* trans-stmt.c (gfc_trans_character_select): Use
	build_constructor_from_list instead of build_constructor.

java/
	Make CONSTRUCTOR use VEC to store initializers.
	* check-init.c (check_init): Update to cope with VEC in
	CONSTRUCTOR_ELTS.
	* class.c (make_field_value, make_method_value, get_dispatch_table,
	make_class_data, emit_symbol_table, emit_catch_table,
	emit_assertion_table): Use build_constructor_from_list instead of
	build_constructor.
	* constants.c (build_constants_constructor): Likewise.
	* java-gimplify.c (java_gimplify_new_array_init): Update to cope with
	VEC in CONSTRUCTOR_ELTS.
	* java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
	PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
	of a TREE_LIST.
	* jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
	CONSTRUCTOR_ELTS.
	* parse.y (build_new_array_init): Use build_constructor_from_list
	instead of build_constructor.
	(patch_new_array_init): Update to cope with VEC in
	CONSTRUCTOR_ELTS.
	(array_constructor_check_entry): Likewise.

objc/
	Make CONSTRUCTOR use VEC to store initializers.
	* objc-act.c (objc_build_constructor): Use build_constructor_from_list
	instead of build_constructor.

testsuite/
	Make CONSTRUCTOR use VEC to store initializers.
	* g++.dg/ext/complit3.C: Check for specific error messages.
	* g++.dg/init/brace2.C: Update error message.
	* g++.dg/warn/Wbraces2.C: Likewise.

From-SVN: r102182
2005-07-20 01:19:59 +00:00
Daniel Berlin 820cc88fbd Makefile.in (TREE_H): Add treestruct.def.
2005-07-08  Daniel Berlin  <dberlin@dberlin.org>

	* Makefile.in (TREE_H): Add treestruct.def.
	(c-decl.o): Add pointer-set.h
	* c-decl.c (diagnose_mismatched_decls): Don't attempt to look at
	visibility on regular DECL's.
	(merge_decls): Fix the copying of decl nodes of various types for
	the new structures.  Don't update RTL, section name, weak status,
	etc, on DECL's without RTL.
	(grokdeclarator): DECL_ARG_TYPE_AS_WRITTEN is gone.
	Don't check volatile on non-variable types.
	(store_parm_decls_oldstyle): Use pointer_set instead of DECL_WEAK
	to check whether we have seen arguments.
	* c-objc-common.c (c_tree_printer): Reverse order of tests so that
	flag is checked before field (flag is common, field is not).
	* dwarf2out.c (decl_ultimate_origin):  Only DECL's with
	TS_DECL_COMMON could have an origin.
	(add_location_or_const_value_attribute): Don't check section name
	on non-var/function decls.
	(dwarf2out_var_location): Reverse order of tests.
	* emit-rtl.c (set_reg_attrs_for_parm): DECL_CHECK is dead, replace
	with DECL_WRTL_CHECK.
	* expmed.c (make_tree): rtl is now in decl_with_rtl.
	* fold-const.c (fold_binary): Don't check weakness on
	non-var/function decls.
	(tree_expr_nonzero_p): Ditto.
	(fold_checksum_tree): Use tree_decl_extra as sizeof
	buffer.
	* ggc-page.c (extra_order_size_table): Add sizes for
	tree_decl_non_common, tree_parm_decl,  tree_var_decl, and
	tree_field_decl.
	* gimplify.c (gimplify_bind_expr): Only set
	DECL_SEEN_IN_BIND_EXPR_P on VAR_DECL.
	* integrate.c (copy_decl_for_inlining): Don't set RTL on decl's
	without RTL.
	* langhooks-def.h (LANG_HOOK_INIT_TS): New.
	* langhooks.h (init_ts). New langhook.
	* passes.c (rest_of_decl_compilation): Reverse order of tests.
	* print-tree.c (print_node): Update to only print fields that
	exist in the structures the passed decl has.
	* toplev.c (wrapup_global_declarations): Don't reset
	DECL_DEFER_OUTPUT on DECL's that don't contain it.
	* tree-browser.c (browse_tree): DECL_ARG_TYPE_AS_WRITTEN removed.
	* tree-inline.c (remap_decl): Ditto.
	* tree-outof-ssa.c (create_temp): Reverse order of tests.
	* tree-pretty-print.c (print_declaration): Don't print
	DECL_REGISTER on things that don't contain it.
	* tree-vrp.c (expr_computes_nonzero): Don't check weakness on
	non-var/function decls.
	* tree.c (tree_contains_struct): New structure.
	(init_priority_for_decl): New hashtable.
	(tree_int_map): New structure.
	(tree_int_map_eq): New function.
	(tree_int_map_marked_p): Ditto.
	(tree_int_map_hash): Ditto.
	(tree_map): Move to tree.h.
	(tree_map_eq): Externalize.
	(tree_map_hash): Ditto.
	(tree_map_marked_p): Ditto.
	(init_ttree): Set up tree_contains_struct and call langhook.
	(decl_assembler_name): Use DECL_NON_COMMON_CHECK..
	(tree_code_size): Update for new structures.
	(tree_node_structure): Update for new structures.
	(make_node_stat): Don't try to set DECL_IN_SYSTEM_HEADER on decls
	without the field.
	(copy_node_stat):  Copy init priority.
	(build_decl_stat): Ditto for visibility.
	(ts_enum_names): New.
	(tree_contains_struct_check_failed): New function.
	(decl_init_priority_lookup): Ditto.
	(decl_init_priority_insert): Ditto.
	* treestruct.def: New file.
	* tree.h (CODE_CONTAINS_STRUCT): New macro.
	(CONTAINS_STRUCT_CHECK): Ditto.
	(tree_contains_struct_check_failed): New prototype.
	(DECL_CHECK): Removed.
	(DECL_MINIMAL_CHECK): New.
	(DECL_COMMON_CHECK): Ditto.
	(DECL_WRTL_CHECK): Ditto.
	(DECL_NON_COMMON_CHECK): Ditto.
	(DECL_WITH_VIS_CHECK): Ditto.
	(VAR_OR_FUNCTION_DECL_P): Ditto
	(struct tree_decl_minimal): New structure.
	(struct tree_decl_common): Ditto.
	(struct tree_decl_with_rtl): Ditto.
	(struct tree_decl_with_vis): Ditto.
	(struct tree_decl_non_common): Ditto.
	(struct tree_field_decl): Ditto.
	(struct tree_parm_decl): Ditto.
	(struct tree_var_decl): Ditto.
	(struct tree_function_decl): Ditto.
	(struct tree_const_decl): Ditto.
	(struct tree_result_decl): Ditto.
	(union tree_node): Add new structures.
	* var-tracking.c (track_expr_p): Reverse order of tests.

	* doc/c-tree.texi: Add documentation on DECL node internal structure.


2005-07-08  Daniel Berlin  <dberlin@dberlin.org>

	* utils.c (create_param_decl): DECL_ARG_TYPE_AS_WRITTEN is
	removed.

2005-07-08  Daniel Berlin  <dberlin@dberlin.org>

	* Make-lang.in: Add gt-cp-lang.h.
	(cp-lang.o): Ditto.
	* class.c (create_vtable_ptr): Stop setting DECL_ASSEMBLER_NAME on
	the field.
	* config-lang.in: Add cp-lang.c to gtfiles.
	* cp-lang.c: Include hashtab.h.
	(cp_init_ts): New function.
	(LANG_HOOK_INIT_TS): Use macro.
	(decl_shadowed_for_var_lookup): New function.
	(decl_shadowed_for_var_insert): Ditto.
	* cp-tree.h (THUNK_FUNCTION_CHECK): Use decl_common.
	(NON_THUNK_FUNCTION_CHECK): Ditto.
	(DECL_NAMESPACE_ASSOCIATIONS): Use decl_non_common.
	(DECL_INIT_PRIORITY): Ditto.
	(DECL_HAS_SHADOWED_FOR_VAR_P): Ditto.
	(DECL_SHADOWED_FOR_VAR): Use hashtable.
	(SET_DECL_SHADOWED_FOR_VAR): Ditto.
	* decl.c (duplicate_decls): Update for new/updated structures.
	(poplevel): Use SET_DECL_SHADOWED_FOR_VAR.
	* decl2.c (start_static_initialization_or_destruction): Deal with
	priority.
	* pt.c (tsubst_decl): Check TS_DECL_WRTL before doing
	SET_DECL_RTL.
	* tree.c (handle_init_priority_attribute): Handle priority.

2005-07-08  Daniel Berlin  <dberlin@dberlin.org>

	* objc-act.c (objc_push_parm): DECL_ARG_TYPE_AS_WRITTEN is
	removed.
	* objc-act.h (KEYWORD_ARG_NAME): Use decl_non_common.
	(KEYWORD_KEY_NAME): Use decl_minimal.
	(METHOD_SEL_NAME): Ditto..
	(METHOD_SEL_ARGS): Use decl_non_common.
	(METHOD_ADD_ARGS): Ditto.
	(METHOD_ADD_ARGS_ELLIPSIS_P): Use decl_common.
	(METHOD_DEFINITION): Ditto.
	(METHOD_ENCODING): Ditto.
	* objc-lang.c: (objc_init_ts): New function.

2005-07-08  Daniel Berlin  <dberlin@dberlin.org>

	* trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
	is removed.

From-SVN: r101799
2005-07-08 23:37:11 +00:00
Ziemowit Laski a0e71127bb objc-act.c (objc_build_struct): Pass in an actual @interface instead of its name...
[gcc/objc/ChangeLog]
2005-07-07  Ziemowit Laski  <zlaski@apple.com>

        * objc-act.c (objc_build_struct): Pass in an actual @interface
        instead of its name, and annotate the struct created (and all
        existing variants thereof) with the @interface.
        (objc_compare_types): Treat forward-declared ObjC classes
        as stand-alone (root) classes for purposes of type comparisons.
        (build_private_template): Move some code to objc_build_struct().

[gcc/testsuite/ChangeLog]
2005-07-07  Ziemowit Laski  <zlaski@apple.com>

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

From-SVN: r101750
2005-07-08 01:53:37 +00:00
Ziemowit Laski f5d21c4ca1 re PR objc/22274 (string[1-4].m, const-str-5.m fails with the gnu runtime)
/objc/ChangeLog]
2005-07-07  Ziemowit Laski  <zlaski@apple.com>

        PR objc/22274
        * objc-act.c (objc_build_string_object): For GNU-style constants,
        use the @interface type rather than the built-in type.

[gcc/testsuite/ChangeLog]
2005-07-07  Ziemowit Laski  <zlaski@apple.com>

        PR objc/22274
        * obj-c++.dg/gnu-runtime-[1-2].mm: New.
        * objc.dg/gnu-runtime-2.m: New.

From-SVN: r101686
2005-07-07 06:25:49 +00:00
Kazu Hirata f726bf47e3 Make-lang.in (cc1plus-checksum.c): Use build/genchecksum$(build_exeext), not build/genchecksum$(exeext).
objc/
	* Make-lang.in (cc1plus-checksum.c): Use
	build/genchecksum$(build_exeext), not build/genchecksum$(exeext).

objcp/
	* Make-lang.in (cc1plus-checksum.c): Use
	build/genchecksum$(build_exeext), not build/genchecksum$(exeext).

From-SVN: r101553
2005-07-03 14:45:35 +00:00
Joseph Myers c85ce869e7 c.opt, [...]: Remove "." from end of help texts.
* c.opt, common.opt, config/bfin/bfin.opt, config/pa/pa.opt,
	config/rs6000/rs6000.opt, params.def: Remove "." from end of help
	texts.
	* config/avr/avr.c: Do not use '`' as left quote.
	* config/rs6000/rs6000.c, config/s390/s390.c, opts.c, tree.c:
	Remove "." from end of diagnostics.  Make diagnostics start with
	lowercase letter.

cp:
	* name-lookup.c, parser.c: Use %q, %< and %> to quote in
	diagnostics.

fortran:
	* lang.opt: Remove "." from end of help texts.

objc:
	* objc-act.c: Use %q to quote in diagnostics.

From-SVN: r101533
2005-07-02 14:19:59 +01:00
Joseph Myers dee158440e toplev.c (default_tree_printer): Handle setting location with '+' flag.
2005-07-02  Zack Weinberg  <zack@codesourcery.com>
            Joseph S. Myers  <joseph@codesourcery.com>

	* toplev.c (default_tree_printer): Handle setting location with
	'+' flag.
	* c-objc.common.c (c_tree_printer): Likewise.
	* c-format.c (gcc_diag_flag_specs): Add '+'.
	(gcc_cdiag_char_table): Allow '+' flag for tree formats.
	(format_types_orig): Allow '+' flag for gcc_diag and gcc_cdiag
	formats.
	* c-common.c, c-decl.c, c-objc-common.c, c-pragma.c,
	config/arm/pe.c, config/i386/winnt.c, config/ia64/ia64.c,
	config/mcore/mcore.c, config/sh/symbian.c, config/sol2.c,
	config/v850/v850.c, function.c, stor-layout.c, toplev.c,
	tree-inline.c, tree-optimize.c, tree.c, varasm.c: Use '+' flag
	instead of %J or %H.  Use 'q' flag for quoting.  Avoid '.' at end
	of diagnostics.  Use %q+D not %s for a decl.  Do not pass excess
	format arguments where %J is used without %D.

cp:
	* error.c (location_of): Add comment.
	(locate_error, cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
	* cp-tree.h (cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
	* call.c, class.c, decl.c, decl2.c, friend.c, init.c,
	name-lookup.c, parser.c, pt.c, search.c, semantics.c, typeck.c,
	typeck2.c: Use '+' flag instead of %J, cp_error_at, cp_warning_at
	or cp_pedwarn_at.  Mark up some diagnostic strings with N_.

java:
	* class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
	flag for quoting.

objc:
	* objc-act.c: Use '+' flag instead of %J.  Use 'q' flag for
	quoting.

testsuite:
	* gcc.dg/format/gcc_diag-1.c: Update.

From-SVN: r101532
2005-07-02 11:55:32 +01:00
Ziemowit Laski e6b0553409 objc-act.c (objc_build_volatilized_type): New function.
[gcc/objc/ChangeLog]
2005-06-30  Ziemowit Laski  <zlaski@apple.com>

       * objc-act.c (objc_build_volatilized_type): New function.
       (objc_volatilize_decl): Call objc_build_volatilized_type()
       instead of build_qualified_type().

[gcc/testsuite/ChangeLog]
2005-06-30  Ziemowit Laski  <zlaski@apple.com>

       * obj-c++.dg/try-catch-11.mm: New.
       * objc.dg/try-catch-10.m: New.

From-SVN: r101493
2005-07-01 01:44:12 +00:00
Zack Weinberg 39ce81c9c5 pretty-print.h (PP_NL_ARGMAX): New.
gcc:
	* pretty-print.h (PP_NL_ARGMAX): New.
	(text_info): Add locus.
	(struct chunk_info): New.
	(output_buffer): Add formatted_obstack, chunk_obstack, and
	cur_chunk_array. Change obstack to a pointer.
	(pp_wrapping_mode_t, pp_wrapping_mode, pp_set_verbatim_wrapping): New.
	(struct pretty_print_info): Replace ideal_maximum_length and
	prefixing_rule with wrapping.
	(pp_line_cutoff, pp_prefixing_rule): Update to match.
	Update prototypes and wrapper macros throughout.
	* pretty-print.c (pp_formatted_text_data, pp_append_r)
	(pp_base_clear_output_area, pp_construct, pp_base_formatted_text)
	(pp_base_last_position_in_text, pp_base_newline, pp_base_character):
	Update for changes to pp structure.
	(pp_base_prepare_to_format, pp_base_format_text): Delete.
	(pp_base_format, pp_base_output_formatted_text): New functions.
	(pp_base_format_verbatim): Use pp_set_verbatim_wrapping.
	(pp_verbatim): Clear text.locus.
	(pp_printf): Likewise.  Use pp_format and pp_output_formatted_text.
	* c-objc-common.c (c_tree_printer): Update function signature.
	* diagnostic.c (diagnostic_initialize): Update for changes to
	pp structure.
	(diagnostic_report_diagnostic): Call pp_format and then
	pp_output_formatted_text.
	(verbatim): Clear text.locus.
	* diagnostic.h (diagnostic_prefixing_rule, diagnostic_line_cutoff):
	Update for changes to pp structure.

	* c-lang.c: No need to include c-pretty-print.h.
	* Makefile.in: Remove bogus line containing only a tab.
	(c-lang.o): Update dependencies.
	* toplev.c (announce_function): Don't use verbatim.
	(default_tree_printer): Update signature.

	* objc/objc-lang.c: No need to include c-pretty-print.h.
	* objc/Make-lang.in: Update dependencies.

gcc/cp:
	* cp-lang.c: No need to include cxx-pretty-print.h.
	* error.c (cp_printer): Update signature.  No need to process
	flags.
	(print_instantiation_partial_context): Output last newline
	with pp_base_newline.
	* Make-lang.in: Update dependencies.

gcc/objcp:
	* objcp-lang.c: No need to include cxx-pretty-print.h.
	* Make-lang.in: Update dependencies.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r101481
2005-06-30 23:09:06 +00:00
Ziemowit Laski c64de75f40 darwin.c (machopic_select_section): constant ObjC string objects now always have type "__builtin_ObjCString".
[gcc/ChangeLog]
2005-06-29  Ziemowit Laski  <zlaski@apple.com>

        * config/darwin.c (machopic_select_section): constant ObjC string
        objects now always have type "__builtin_ObjCString".

[gcc/objc/ChangeLog]
2005-06-29  Ziemowit Laski  <zlaski@apple.com>

        * objc-act.c (objc_build_internal_const_str_type): New function.
        (check_string_class_template): Use objc_get_class_ivars() instead
        of TYPE_FIELDS() to retrieve ivar list.
        (AT_LEAST_AS_LARGE_AS): Check the size of each field's type rather
        than the field itself.
        (objc_build_string_object): Synthesize a "__builtin_ObjCString"
        type and use it to lay out compile-time string objects.
        * objc-act.h (OCTI_INTERNAL_CNST_STR_TYPE, internal_const_str_type):
        New.

[gcc/testsuite/ChangeLog]
2005-06-29  Ziemowit Laski  <zlaski@apple.com>

        * obj-c++.dg/const-str-1[0-1].mm: New.
        * objc.dg/const-str-1[0-1].m: New.

From-SVN: r101437
2005-06-29 21:01:29 +00:00
Paul Brook 617a1b7144 Makefile.in: Set and use UNWIND_H.
2005-06-28  Paul Brook  <paul@codesourcery.com>

gcc/
	* Makefile.in: Set and use UNWIND_H.  Install as unwind.h.
	* c-decl.c (finish_decl): Call default_init_unwind_resume_libfunc.
	* except.c (add_ehspec_entry): Generate arm eabi filter lists.
	(assign_filter_values): Ditto.
	(output_ttype): New function.
	(output_function_exception_table): Use output_ttype.  Generate arm
	eabi filter lists.
	(default_init_unwind_resume_libfunc): New function.
	* except.h (default_init_unwind_resume_libfunc): Add prototype.
	* optabs.c (init_optabs): Don't set unwind_resume_libfunc.
	* opts.c (decode_options): Use targetm.unwind_tables_default.
	* target-def.h (TARGET_ASM_TTYPE): Provide and use definition.
	(TARGET_ARM_EABI_UNWINDER, TARGET_UNWIND_TABLES_DEFAULT): Ditto.
	* target.h (struct gcc_target): Add asm.ttype, unwind_tables_default
	and arm_eabi_unwinder.
	* unwind-c.c: Support Arm EABI unwinder.
	* unwind.h: Rename ...
	* unwind-generic.h: ... To this.
	* doc/tm.texi (TARGET_ASM_TTYPE, TARGET_ARM_EABI_UNWINDER): Document.
	(TARGET_UNWID_TABLES_DEFAULT): Document.

	* config/arm/arm-protos.h (arm_output_fn_unwind): Add prototype.
	* config/arm/arm.c (arm_unwind_emit, arm_output_ttype): New functions.
	(TARGET_UNWIND_EMIT, TARGET_ASM_TTYPE, TARGET_ARM_EABI_UNWINDER):
	Define.
	(thumb_pushpop, thumb_output_function_prologue): Output unwinding
	directives.
	(arm_unwind_emit_stm, arm_unwind_emit_set): New functions.
	* config/arm/arm.h (MUST_USE_SJLJ_EXCEPTIONS): Only define when
	!TARGET_UNWIND_INFO.
	(ARM_OUTPUT_FN_UNWIND, ARM_EABI_UNWIND_TABLES): Define.
	* config/arm/bpabi.h (TARGET_UNWIND_INFO): Define.
	* config/arm/elf.h (ASM_DECLARE_FUNCTION_NAME,
	ASM_DECLARE_FUNCTION_SIZE): Use ARM_OUTPUT_FN_UNWIND.
	* config/arm/lib1funcs.asm: Include libunwind.S.
	* config/arm/libgcc-bpabi.ver: Add unwinding routines.
	* config/arm/libunwind.S: New file.
	* config/arm/pr-support.c: New file.
	* config/arm/t-bpabi (LIB1ASMFUNCS): Add _unwind.
	(UNWIND_H, LIB2ADDEH, LIB2ADDEHDEP): Set.
	* config/arm/t-symbian (UNWIND_H, LIB2ADDEH, LIB2ADDEHDEP): Set.
	* config/arm/unwind-arm.c: New file.
	* config/arm/unwind-arm.h: New file.
	* config/i386/t-netware (USER_H): Remove unwind.h.
	* config/ia64/ia64.h (TARGET_UNWIND_TABLES_DEFAULT): Define.

gcc/cp/
	* Make-lang.in (cp/except.o): Depend on $(TARGET_H)
	* except.c: Include target.h.
	(init_exception_processing): Initialize unwind_resume_libfunc.
	* doc/tm.texi: Document TARGET_ASM_TTYPE
gcc/ada/
	* misc.c (gnat_init_gcc_eh): Call default_init_unwind_resume_libfunc.
gcc/java/
	* decl.c (java_init_decl_processing): Call
	default_init_unwind_resume_libfunc.
gcc/objc/
	* objc-act.c (objc_init_exceptions): Call
	default_init_unwind_resume_libfunc.
libstdc++/
	* acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Check for
	__cxa_end_cleanup.
	* libsupc++/Makefile.am (sources): Add eh_call.c and eh_arm.c.
	* libsupc++/eh_arm.cc: New file.
	* libsupc++/eh_call.cc: New file.
	* libsupc++/eh_catch.cc (__cxa_get_exception_ptr): Use
	__gxx_caught_object.
	(__cxa_begin_catch): Ditto. Use __is_gxx_exception_class. Call
	_Unwind_Complete when using the ARM EABI.
	(__cxa_end_catch): Use __is_gxx_exception_class.
	* libsupc++/eh_personality.cc: Define NO_SIZE_OF_ENCODED_VALUE when
	using the ARM EABI.
	(save_caught_exception, restore_caught_exception): New functions.
	(_throw_typet): New typedef.
	(get_ttype_entry, get_adjusted_ptr, check_exception_spec): Add ARM
	EABI implementations.
	(PERSONALITY_FUNCTION): Use new functions.  Addd support for ARM EABI
	unwinding libary.
	(__cxa_unexpected): Disable when using the ARM EABI.
	* libsupc++/eh_throw.cc (__cxa_throw): Use __GXX_INIT_EXCEPTION_CLASS.
	(__cxa_rethrow): Use __is_gxx_exception_class.  Call
	_Unwind_RaiseException when using the ARM EABI.
	* libsupc++/unwind-cxx.h (struct __cxa_exception): Add fields for ARM
	EABI semantics.
	(struct __cxa_eh_globals): Ditto.
	(__cxa_call_terminate): Add prototype.
	(__cxa_type_match, __cxa_begin_cleanup, __cxa_end_cleanup): Add
	prototypes.
	(__get_exception_header_from_obj, __get_exception_header_from_ue):
	Move earlier in file.
	(__is_gxx_exception_class, __GXX_INIT_EXCEPTION_CLASS,
	__gxx_caught_object): New functions.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* libmath/Makefile.in: Regenerate.
	* libsupc++/Makefile.in: Regenerate.
	* po/Makefile.in: Regenerate.
	* src/Makefie.in: Regenerate.
	* testsuite/makefile.in: Regenerate.

From-SVN: r101385
2005-06-28 19:52:27 +00:00
Ziemowit Laski 2aba33dd6f objc-act.c (objc_build_struct): Save the TYPE_OBJC_INFO portion of TYPE_LANG_SPECIFIC info for all variants of...
[gcc/objc/ChangeLog]
2005-06-27  Ziemowit Laski  <zlaski@apple.com>

        * objc-act.c (objc_build_struct): Save the TYPE_OBJC_INFO
        portion of TYPE_LANG_SPECIFIC info for all variants of
        a class before calling finish_struct(), and restore
        same TYPE_OBJC_INFO afterwards.

[gcc/testsuite/ChangeLog]
2005-06-27  Ziemowit Laski  <zlaski@apple.com>

        * obj-c++.dg/proto-lossage-5.mm: New.
        * objc.dg/proto-lossage-5.m: New.

From-SVN: r101368
2005-06-28 02:01:08 +00:00
Kelley Cook f12c30a8f1 Update FSF address.
From-SVN: r101309
2005-06-25 00:33:05 +00:00
Joseph Myers 46bdb9cffb c-tree.h (default_function_array_conversion): Declare.
* c-tree.h (default_function_array_conversion): Declare.
	* c-typeck.c (default_function_array_conversion): Export.  Correct
	comment.
	(default_conversion): Do not call
	default_function_array_conversion.  Do not allow FUNCTION_TYPE.
	(build_function_call): Call default_function_array_conversion on
	the function.
	(convert_arguments): Do not call it on the function arguments.
	(build_unary_op): Do not allow ARRAY_TYPE or FUNCTION_TYPE for
	TRUTH_NOT_EXPR.  Call default_function_array_conversion for taking
	address of ARRAY_REF.
	(build_compound_expr): Do not call
	default_function_array_conversion.
	(build_c_cast): Do not call default_function_array_conversion.
	(convert_for_assignment): Do not call default_conversion.
	(digest_init): Call default_function_array_conversion to convert
	string constants and compound literals to pointers, but not
	otherwise.
	(output_init_element): Likewise.
	(build_asm_expr): Do not call default_function_array_conversion.
	(c_process_expr_stmt): Likewise.
	(c_objc_common_truthvalue_conversion): Likewise.  Do not allow
	FUNCTION_TYPE.
	* c-parser.c (c_parser_expression_conv): New.
	(c_parser_asm_operands, c_parser_expr_list): Add convert_p
	argument.  All callers changed.  Call
	default_function_array_conversion if convert_p.
	(c_parser_initializer, c_parser_initval): Call
	default_function_array_conversion except for string constants and
	compound literals.
	(c_parser_initelt): Call default_function_array_conversion for
	ObjC expression received.
	(c_parser_statement_after_labels): Call c_parser_expression_conv
	for return and expression statements.
	(c_parser_paren_condition, c_parser_for_statement,
	c_parser_conditional_expression): Call c_parser_expression_conv.
	(c_parser_expr_no_commas, c_parser_conditional_expression,
	c_parser_binary_expression, c_parser_cast_expression,
	c_parser_unary_expression): Call
	default_function_array_conversion.

objc:
	* objc-act.c (my_build_string_pointer): New.
	(objc_get_class_reference, get_super_receiver): Call
	my_build_string_pointer instead of my_build_string when building
	function arguments.

testsuite:
	* gcc.dg/noncompile/20040203-3.c: Update expected message.

From-SVN: r100984
2005-06-15 16:55:47 +01:00
Mike Stump 14d63fb68e objc-act.c (volatilized_hash): Avoid warnings on 64-bit machines.
* objc-act.c (volatilized_hash): Avoid warnings on 64-bit
        machines.

From-SVN: r100155
2005-05-25 15:48:44 +00:00
Ziemowit Laski d11dd68408 objc-act.c (objc_build_struct): New function.
* objc-act.c (objc_build_struct): New function.
        (objc_derived_from_p): Likewise.
        (objc_build_component_ref): Likewise.
        (objc_copy_binfo): Likewise.
        (objc_xref_basetypes): Likewise.
        (objc_lookup_protocol): Likewise.
        (objc_compare_protocols): Likewise.
        (objc_volatilize_decl): Likewise.
        (encode_aggregate_fields): Likewise.
        (volatilized_hash): Likewise.
        (volatilized_eq): Likewise.
        (objc_compare_types): Likewise.
        (objc_type_quals_match): Likewise.
        (DERIVED_FROM_P): New ObjC macro, corresponding to C++ macro
        of same name.
        (get_class_ivars): Add second parameter indicating if entire
        hierarchy is desired.
        (struct volatilized_type): New type.
        (volatilized_htab): New hash table.
        (objc_types_compatible_p, objc_comptypes): Remove functions.
        (synth_module_prologue): Do not initialize 'unused_list'.
        (objc_get_class_reference): Fix ObjC++ impedance mismatches.
        (objc_declare_alias): Implement as a typedef.
        (objc_substitute_decl, objc_gimplify_expr): Reformat.
        (objc_get_class_ivars): Adjust call to get_class_ivars().
        (next_sjlj_build_enter_and_setjmp, synth_forward_declarations,
        build_ivar_reference, get_super_receiver): Call
        objc_build_component_ref() instead of build_component_ref().
        (objc_begin_catch_clause): Use DERIVED_FROM_P() instead of
        objc_comptypes().
        (build_private_template): Call objc_build_struct() instead of
        start_struct() and finish_struct().
        (hash_init): Initialize volatilized_htab.
        (objc_is_public): Adjust calls to objc_get_ivars(); adjust
        ObjC++ impedance mismatches.
        (encode_aggregate_within): Streamline by calling
        encode_aggregate_fields().
        * objc-act.h (objc_types_compatible_p): Remove prototype.
        (OCTI_UNUSED_LIST, unused_list): Remove slot.
        * objc-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Remove.

From-SVN: r100123
2005-05-24 22:21:01 +00:00
Ziemowit Laski 210f12a769 Give credit, where credit is due.
From-SVN: r100035
2005-05-20 23:42:07 +00:00
Geoffrey Keating 3fd30b88df dummy-checksum.c: New.
2005-05-18  Geoffrey Keating  <geoffk@apple.com>

	* dummy-checksum.c: New.
	* genchecksum.c: New.
	* c.opt (print_pch_checksum): New flag.
	* c-pch.c (struct c_pch_validity): Make much shorter.
	(no_checksum): New.
	(host_machine): Remove.
	(target_machine): Remove.
	(get_ident): Change PCH version number.
	(pch_init): When -fverbose-asm, print out the compiler fingerprint.
	Don't put triplets or version string in PCH validity data.
	Do put the compiler checksum in the validity data.
	(c_common_valid_pch): Don't check triplets or version string.  Do
	check checksum.
	(c_common_print_pch_checksum): New.
	* c-opts.c (c_common_handle_option): Add OPT_print_pch_checksum.
	Print fingerprint with -v.
	* c-common.h (c_common_print_pch_checksum): New.
	(executable_checksum): New.
	* Makefile.in (STAGEMOVESTUFF): Add cc1*-dummy, *-checksum.c.
	(cc1-dummy): New rule.
	(cc1-checksum.c): New rule.
	(cc1-checksum.o): New rule.
	(cc1): Add checksum support.
	(build/genchecksum): New.
	(build/genchecksum.o): New.
	(dummy-checksum.o): New.
	(genobjnames): Add genchecksum.o.
	(mostlyclean): Remove *-checksum.c.
	(gnucompare): Add libgcc to list of directories checked.
	Make comparison problems in libgcc/ and with checksum files only
	be warnings.
	* doc/invoke.texi (Precompiled Headers): Remove caution.
	Document that it must be the exact same binary.  Add a few
	known-safe flags to the list.

In cp/:
2005-05-18  Geoffrey Keating  <geoffk@apple.com>

	* Make-lang.in (cc1plus-dummy): New.
	(cc1plus-checksum.c): New.
	(cc1plus-checksum.o): New.
	(cc1plus): Add cc1plus-checksum.o.

In objc/:
2005-05-18  Geoffrey Keating  <geoffk@apple.com>

	* Make-lang.in (cc1obj-dummy): New.
	(cc1obj-checksum.c): New.
	(cc1obj-checksum.o): New.
	(cc1obj): Add cc1obj-checksum.o.

In objcp/:
2005-05-18  Geoffrey Keating  <geoffk@apple.com>

	* Make-lang.in (cc1objplus-dummy): New.
	(cc1objplus-checksum.c): New.
	(cc1objplus-checksum.o): New.
	(cc1objplus): Add cc1objplus-checksum.o.

From-SVN: r99928
2005-05-18 20:45:26 +00:00
Mike Stump 55cb016929 re PR objc/21641 (cris-axis-elf, cris-axis-linux-gnu, mmix-knuth-mmixware, x86_64-unknown-linux-gnu broken libobjc/Object.m)
PR objc/21641
        * objc-act.c (struct interface_tuple): Mark it up for GC.
        (interface_htab): It is really a struct interface_tuple.

From-SVN: r99922
2005-05-18 20:02:27 +00:00
Ziemowit Laski 38b9c8c3a9 Yet more Objective-C++...
* objc-act.c (objc_finish_try_stmt): Add return value.
        (objc_build_synchronized): Likewise.

        * objc-act.c (objc_is_gcable_type): Add.
        (objc_substitute_decl): Add.
        (objc_build_ivar_assignment): Add.
        (objc_build_global_assignment): Add.
        (objc_build_strong_cast_assignment): Add.
        (objc_is_ivar_reference_p): Add.
        (objc_is_global_reference_p): Add.
        (objc_generate_write_barrier): Add.
        (objc_rewrite_function_call): Add.
        (objc_gimplify_expr): Add Objective-C++ support.
        * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Likewise.
        (SIZEOF_OBJC_TYPE_LANG_SPECIFIC): Add.
        (INIT_TYPE_OBJC_INFO): Add Objective-C++ support.
        (DUP_TYPE_OBJC_INFO): Likewise.
        (struct imp_entry): Add field has_cxx_cdtors.
        (struct imp_entry *imp_list): Add OCTI_UMSG_FAST_DECL,
        OCTI_METH_LIST_TEMPL, OCTI_METH_PROTO_LIST_TEMPL,
        OCTI_IVAR_LIST_TEMPL, OCTI_ASSIGN_IVAR_DECL,
        OCTI_ASSIGN_IVAR_FAST_DECL, OCTI_ASSIGN_GLOBAL_DECL,
        OCTI_ASSIGN_STRONGCAST_DECL.
        (umsg_fast_decl): Add.
        (objc_assign_ivar_decl): Add.
        (objc_assign_ivar_fast_decl): Add.
        (objc_assign_global_decl): Add.
        (objc_assign_strong_cast_decl): Add.
        (objc_method_list_ptr): Add.
        (objc_method_proto_list_ptr): Add.
        (objc_ivar_list_ptr): Add.

        * objc-act.c (should_call_super_dealloc): Add.
        (OBJC_VERSION): Bump to 6.
        (objc_is_gcable_type): Add.
        (objc_substitute_decl): Add.
        (objc_build_ivar_assignment): Add.
        (objc_build_global_assignment): Add.
        (objc_build_strong_cast_assignment): Add.
        (objc_is_gcable_p): Add.
        (objc_is_ivar_reference_p): Add.
        (objc_is_global_reference_p): Add.
        (generate_shared_structures): Add flags parameter.
        (objc_generate_cxx_ctor_or_dtor): Add.
        (objc_generate_cxx_cdtors): Add.
        (add_class): Add name parameter.
        (objc_types_share_size_and_alignment): Add.
        (comp_proto_with_proto): Add strict parameter.
        (CLS_HAS_CXX_STRUCTORS): Add.
        (TAG_ASSIGNIVAR): Add.
        (TAG_ASSIGNGLOBAL): Add.
        (TAG_ASSIGNSTRONGCAST): Add.
        (TAG_MSGSEND_FAST): Add.
        (TAG_ASSIGNIVAR_FAST): Add.
        (TAG_CXX_CONSTRUCT): Add.
        (TAG_CXX_DESTRUCT): Add.
        (OBJC_LOOKUP_CLASS): Add.
        (OBJC_LOOKUP_NO_SUPER): Add.
        (objc_finish_file): Add pch support.
        (objc_finish_implementation): Add Objective-C++ support.
        (synth_module_prologue): Likewise.
        (synth_module_prologue): Add fast dispatching.
        (objc_get_class_reference): Add Objective-C++ support.
        (objc_generate_write_barrier): Likewise.
        (next_sjlj_build_enter_and_setjmp): Likewise.
        (objc_begin_try_stmt): Likewise.
        (build_next_objc_exception_stuff): Add fast ivar support.
        (build_private_template): Mark the record as used so debug
        information is generated.
        (build_protocol_template): Add Objective-C++ support.
        (objc_method_parm_type) Likewise.
        (objc_generate_cxx_ctor_or_dtor): Likewise.
        (objc_generate_cxx_cdtors): Likewise.
        (build_protocol_initializer): Likewise.
        (build_category_template): Likewise.
        (build_class_template): Likewise.
        (build_method_list_template): Likewise.
        (build_category_initializer): Likewise.
        (build_shared_structure_initializer): Likewise.
        (objc_finish_message_expr): Likewise.
        (build_objc_method_call): Add fast dispatch support.
        (lookup_method_static): Add support to end search at superclasses.
        (add_method_to_hash_list): Add strict parameter to
        comp_proto_with_proto.
        (objc_add_method): Likewise.
        (objc_add_method): Also set the interface_value.
        (add_instance_variable): Add Objective-C++ support.
        (objc_is_public): Likewise.
        (start_class): Likewise.
        (continue_class): Likewise.
        (encode_aggregate_within): Likewise.
        (start_method_def): Likewise.
        (objc_start_function): Clear current_function_returns_value
        and current_function_returns_null.
        (really_start_method): Add Objective-C++ support.
        (objc_finish_method_definition): Add warning for missing
        [super dealloc].
        (finish_objc): Add Objective-C++ support.
        (generate_objc_image_info): Likewise.
        (objc_lookup_ivar): Likewise.
        * objc-act.h (TYPE_HAS_OBJC_INFO): Likewise.
        (INIT_TYPE_OBJC_INFO): Likewise.
        (DUP_TYPE_OBJC_INFO): Likewise.

From-SVN: r99857
2005-05-17 20:07:08 +00:00
DJ Delorie d4ee4d2525 diagnostic.c (warning): Accept parameter to classify warning option.
* diagnostic.c (warning): Accept parameter to classify warning option.
(warning0): New, for when a pointer to an error() like function is needed.
* errors.c (warning): Likewise.
* errors.h (warning, warning0): Adjust prototypes.
* toplev.h (warning, warning0): Likewise.

* attribs.c, builtins.c, c-common.c, c-decl.c, c-format.c,
c-gimplify.c, c-lex.c, c-objc-common.c, c-opts.c, c-parser.c,
c-pragma.c, c-typeck.c, calls.c, cgraph.c, coverage.c, emit-rtl.c,
fold-const.c, fortran/trans-decl.c, function.c, gcse.c,
genautomata.c, haifa-sched.c, opts.c, passes.c, regclass.c,
reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c,
tree-dump.c, tree-inline.c, tree-mudflap.c, tree-optimize.c,
tree-ssa.c, tree.c, varasm.c: Adjust warning() callers.

* config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c,
config/avr/avr.c, config/bfin/bfin.c, config/c4x/c4x-c.c,
config/c4x/c4x.c, config/cris/cris.c, config/darwin-c.c,
config/darwin.c, config/darwin.h, config/h8300/h8300.c,
config/i386/cygming.h, config/i386/djgpp.h, config/i386/i386.c,
config/i386/winnt.c, config/ia64/ia64-c.c, config/ia64/ia64.c,
config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c,
config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c,
config/mmix/mmix.c, config/ns32k/ns32k.c, config/pa/pa-hpux11.h,
config/pa/pa.c, config/rs6000/aix43.h, config/rs6000/aix51.h,
config/rs6000/aix52.h, config/rs6000/darwin.h,
config/rs6000/rs6000-c.c, config/rs6000/rs6000.c,
config/s390/s390.c, config/sh/sh.c, config/sh/sh.h,
config/sh/symbian.c, config/sol2-c.c, config/sol2.c,
config/stormy16/stormy16.c, config/v850/v850-c.c,
config/v850/v850.c, config/xtensa/xtensa.c: Adjust warning()
callers.

* ada/misc.c: Adjust warning() callers.

* cp/call.c, cp/class.c, cp/cvt.c, cp/decl.c, cp/decl2.c,
cp/except.c, cp/friend.c, cp/init.c, cp/lex.c, cp/mangle.c,
cp/method.c, cp/name-lookup.c, cp/parser.c, cp/repo.c, cp/rtti.c,
cp/tree.c, cp/typeck.c, cp/typeck2.c: Adjust warning() callers.

* fortran/trans-decl.c: Adjust warning() callers.

* java/class.c, java/decl.c, java/expr.c, java/jcf-io.c,
java/jcf-parse.c, java/jv-scan.c, java/parse.y: Adjust warning()
callers.

* objc/objc-act.c: Adjust warning() callers.

* treelang/parse.y: Adjust warning() callers.

From-SVN: r98633
2005-04-23 17:29:07 -04:00
Roger Sayle dbb743654f c-common.h (objc_build_method_signature): Update prototype.
* c-common.h (objc_build_method_signature): Update prototype.
	* stub-objc.c (objc_build_method_signature): Update the stub
	implementation to accept and ignore additional parameter.
	* c-parser.c (c_parser_objc_method_decl): Reorgnize to pass
	the value of ellipsis to objc_build_method_signature instead
	of setting TREE_OVERFLOW on the parms TREE_LIST node.

	* objc-act.h (METHOD_ADD_ARGS_ELLIPSIS_P): New macro for accessing
	this field of an objc method decl.
	* objc-act.c (build_method_decl): Take an additional "ellipsis"
	argument, and set METHOD_ADD_ARGS_ELLIPSIS_P as appropriate.
	(objc_build_method_signature): Accept additional "ellipsis"
	argument and pass it to build_method_decl.
	(get_arg_type_list, start_method_def, gen_method_decl): Use
	the new METHOD_ADD_ARGS_ELLIPSIS_P instead of examining the
	TREE_OVERFLOW field of a TREE_LIST node.

From-SVN: r98528
2005-04-21 21:31:40 +00:00
Joseph Myers 187230a795 re PR c/12913 (Jumps into variable length array scope not rejected)
PR c/12913
	* c-tree.h (struct c_label_list): Update comment.
	(struct c_label_context): Rename to struct c_label_context_se.
	(label_context_stack): Rename to label_context_stack_se.
	(C_DECL_UNJUMPABLE_VM, C_DECL_UNDEFINABLE_VM, struct
	c_label_context_vm, label_context_stack_vm, c_begin_vm_scope,
	c_end_vm_scope): New.
	(C_DECL_DECLARED_BUILTIN, C_DECL_USED): Use FUNCTION_DECL_CHECK.
	* c-decl.c (pop_scope): Call c_end_vm_scope.
	(pushdecl): Call c_begin_vm_scope for variably modified
	declarations.
	(define_label): Check for jumping into scope of identifier with
	variably modified type.  Push label on stack for those defined at
	current context of identifiers with variably modified type.
	(start_function): Create stack level for context of identifiers
	with variably modified type.
	(finish_function): Pop stack level for context of identifiers with
	variably modified type.
	* c-typeck.c (label_context_stack): Rename to
	label_context_stack_se.
	(label_context_stack_vm, c_begin_vm_scope, c_end_vm_scope): New.
	(c_finish_goto_label): Check for jumping into scope of identifier
	with variably modified type.  Push label on stack for those jumped
	to from current context of identifiers with variably modified
	type.
	(struct c_switch): Add blocked_vm.
	(c_start_case): Initialize blocked_vm.
	(do_case): Check blocked_vm.
	(c_finish_case): Add comment.
	(c_begin_stmt_expr, c_finish_stmt_expr): Update for renamed
	variable label_context_stack.

objc:
	* objc-act.c (objc_start_function): Create stack level for context
	of identifiers with variably modified type.

testsuite:
	* gcc.dg/c99-vla-jump-1.c, gcc.dg/c99-vla-jump-2.c,
	gcc.dg/c99-vla-jump-3.c, gcc.dg/c99-vla-jump-4.c,
	gcc.dg/c99-vla-jump-5.c: New tests.

From-SVN: r98464
2005-04-20 17:41:48 +01:00
Dale Johannesen 43f479d63f Make-lang.in (objc-lang.o): Depend on tree-gimple.h.
2005-04-13  Dale Johannesen  <dalej@apple.com>

        * objc/Make-lang.in (objc-lang.o):  Depend on tree-gimple.h.
        (objc-act.o):  Ditto.
        * objc/objc-act.c (objc_gimplify_expr):  New.
        (objc_get_callee_fndecl):  New.
        * objc/objc-act.h:  Include tree-gimple.h.  Declare new functions.
        * objc/objc-lang.c (LANG_HOOKS_GIMPLIFY_EXPR):  Define.
        (LANG_HOOKS_GET_CALLEE_FNDECL):  Define.

From-SVN: r98105
2005-04-13 19:28:31 +00:00
Joseph Myers 16ef3accae re PR c++/772 (Statement expressions issues)
PR c/772
	PR c/17913
	* c-tree.h (C_DECL_UNJUMPABLE_STMT_EXPR,
	C_DECL_UNDEFINABLE_STMT_EXPR, struct c_label_list, struct
	c_label_context, label_context_stack): New.
	* c-decl.c (define_label): Check for jumps into statement
	expressions.  Add label to list of defined labels.
	(start_function): Push context on label_context_stack.
	(finish_function): Pop context from label_context_stack.
	* c-typeck.c (label_context_stack): New.
	(c_finish_goto_label): Check for jumps into statement
	expressions.  Add label to list of jumped to labels.
	(struct c_switch): Add blocked_stmt_expr.
	(c_start_case): Initialize it.
	(do_case): Check it.
	(c_finish_case): Verify !blocked_stmt_expr.
	(c_begin_stmt_expr):  Push context on label_context_stack.
	Increment blocked_stmt_expr.  Mark labels jumped to from outside
	as undefinable.
	(c_finish_stmt_expr): December blocked_stmt_expr.  Mark labels
	defined in the statement expression and no longer jumpable to.
	Mark labels jumped to from just outside the statement expression
	as again definable.  Pop context from label_context_stack.
	* doc/extend.texi (Statement Exprs): Update.

objc:
	* objc-act.c (objc_start_function): Push context on
	label_context_stack.

testsuite:
	* gcc.dg/stmt-expr-label-1.c, gcc.dg/stmt-expr-label-2.c,
	gcc.dg/stmt-expr-label-3.c : New tests.
	* gcc.c-torture/execute/medce-2.c: Remove.

From-SVN: r97273
2005-03-30 20:56:39 +01:00
Joseph Myers 8549882418 c-common.c (c_common_truthvalue_conversion): Adjust comment.
* c-common.c (c_common_truthvalue_conversion): Adjust comment.
	Call c_common_truthvalue_conversion rather than
	lang_hooks.truthvalue_conversion.
	* c-convert.c (convert): Call c_objc_common_truthvalue_conversion.
	* c-objc-common.c (c_objc_common_truthvalue_conversion): Move to
	c-typeck.c.
	* c-objc-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Change to
	c_common_truthvalue_conversion.
	* c-parser.c (c_parser_paren_condition, c_parser_for_statement,
	c_parser_conditional_expression, c_parser_binary_expression): Call
	c_objc_common_truthvalue_conversion.
	* c-typeck.c (build_unary_op): Call
	c_objc_common_truthvalue_conversion.
	(build_conditional_expr): Do not call
	lang_hooks.truthvalue_conversion.
	(build_binary_op): Call c_common_truthvalue_conversion.
	(c_objc_common_truthvalue_conversion): Moved from
	c-objc-common.c.  Call default_function_array_conversion instead
	of default_conversion.

objc:
	* objc-act.c (next_sjlj_build_enter_and_setjmp,
	next_sjlj_build_catch_list, next_sjlj_build_try_catch_finally):
	Call c_common_truthvalue_conversion.

From-SVN: r96917
2005-03-23 01:35:06 +00:00
Joseph Myers 27bf414caa c-parser.c: New file.
* c-parser.c: New file.
	* c-parse.in: Remove.
	* Makefile.in (c-parse.o-warn, c-parse.o, c-parse.c, c-parse.y):
	Remove.
	(c-parser.o): Add dependencies.
	(C_AND_OBJC_OBJC, C_OBJS, gcc.srcextra, GTFILES, distclean,
	maintainer-clean, TAGS): Update.
	* c-config-lang.in (gtfiles): Update.
	* gengtype-lex.l: Don't handle "@@".
	* stub-objc.c (objc_get_class_ivars, objc_build_throw_stmt,
	objc_build_synchronized, objc_begin_try_stmt,
	objc_begin_catch_clause, objc_finish_catch_clause,
	objc_build_finally_clause, objc_finish_try_stmt): New.
	* c-tree.h (struct c_declspecs): Add declspecs_seen_p and
	type_seen_p.
	(c_parse_init): Update comment.
	* c-decl.c (c_init_decl_processing): Update comment.
	(build_null_declspecs, declspecs_add_qual, declspecs_add_type,
	declspecs_add_scspec, declspecs_add_attrs): Initialize and update
	new c_declspecs members.

objc:
	* Make-lang.in (objc/objc-parse.o-warn, objc/objc-parse.o,
	objc/objc-parse.c, objc/objc-parse.y): Remove
	(OBJC_OBJS, objc.srcextra, objc.tags, objc.mostlyclean,
	objc.distclean, objc.maintainer-clean): Update for new parser.
	* config-lang.in (gtfiles): Update for new parser.

testsuite:
	* gcc.dg/cpp/separate-1.c, gcc.dg/noncompile/971104-1.c,
	gcc.dg/noncompile/990416-1.c: Adjust expected messages for new
	parser.

From-SVN: r95558
2005-02-25 23:20:48 +00:00
Kazu Hirata 567426d9af lang-specs.h, [...]: Update copyright.
* lang-specs.h, objc-act.c, objc-act.h, objc-lang.c: Update
	copyright.

From-SVN: r94408
2005-01-29 12:16:36 +00:00
Matt Austern 86a43457bf objc-act.c (objc_finish_file): In ObjC++ mode, set at_eof before calling instantiate_pending_templates.
* objc-act.c (objc_finish_file): In ObjC++ mode, set at_eof before
        calling instantiate_pending_templates.

From-SVN: r94362
2005-01-28 05:54:55 +00:00
Alexander Malmberg b0676216f7 re PR objc/18862 (ICE on gcc-4.0-20041205/gcc/testsuite/objc.dg/selector-1.m)
2005-01-26  Alexander Malmberg  <alexander@malmberg.org>

        PR objc/18862
        * objc-act.c (build_selector_translation_table): Use
        input_location in the diagnostic for the GNU runtime or if
        TREE_PURPOSE (chain) is NULL.

From-SVN: r94285
2005-01-26 13:01:57 -08:00
Alexander Malmberg 3f16185feb re PR objc/18408 (ICE compiling code that involves casting classes)
2005-01-25  Alexander Malmberg  <alexander@malmberg.org>

        PR objc/18408
        * objc-act.c (objc_types_compatible_p): New function.
        * objc-act.h (objc_types_compatible_p): Declare.
        * objc-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define.

From-SVN: r94199
2005-01-24 19:13:10 -08:00
Ziemowit Laski 6435c34baf objc-act.c (objc_push_parm): Call c_type_promotes_to() via a lang-hook.
[gcc/objc/ChangeLog]
2005-01-16  Ziemowit Laski  <zlaski@apple.com>

        * objc-act.c (objc_push_parm): Call c_type_promotes_to()
        via a lang-hook.

From-SVN: r93722
2005-01-16 08:13:14 +00:00
Ziemowit Laski aecaa19a32 re PR objc/19321 (objc ignores volatile in argument types for messages)
[gcc/objc/ChangeLog]
2005-01-15  Ziemowit Laski  <zlaski@apple.com>

        PR objc/19321
        * objc-act.c (get_arg_type_list): Decay function arguments into
        pointers.
        (objc_push_parm): Likewise; bring PARM_DECL construction closer
        in line with what the C front-end does.
        (objc_get_parm_info): Call pushdecl() and finish_decl() on
        each PARM_DECL, like the C front-end does.
        (start_method_def): Remove redundant ARRAY_TYPE decay.
        (objc_start_function): Bring closer in line with what the
        C front-end does for functions.

[gcc/testsuite/ChangeLog]
2005-01-15  Ziemowit Laski  <zlaski@apple.com>

        PR objc/19321
        * objc.dg/func-ptr-2.m: New.
        * objc.dg/volatile-1.m: New.

From-SVN: r93706
2005-01-15 21:18:56 +00:00
Mike Stump 28bbb5504d lang-specs.h ("@objective-c"): Use cc1obj when -E is used so that -fobjc-exceptions is accepted.
* lang-specs.h ("@objective-c"): Use cc1obj when -E is used so
        that -fobjc-exceptions is accepted.

From-SVN: r93670
2005-01-14 23:40:43 +00:00
Richard Henderson bedb9fc04b re PR c/19031 (#pragma weak handling changes in 4.0.0)
PR c/19031
        * c-decl.c (pop_file_scope): Call maybe_apply_pending_pragma_weaks.
        * c-lang.c (finish_file): Don't do it here.
        * objc/objc-act.c (objc_finish_file): Likewise.

        * cgraph.c (decl_assembler_name_equal): New.
        (cgraph_node_for_asm, cgraph_varpool_node_for_asm): New.
        (cgraph_varpool_node): Actually link up cgraph_varpool_nodes.
        * cgraph.h (struct cgraph_varpool_node): Add next.
        (cgraph_node_for_asm, cgraph_varpool_node_for_asm): Declare.
        * varasm.c (assemble_alias): Mark the target as needed.

From-SVN: r92803
2005-01-01 23:52:31 -08:00
Ziemowit Laski 9eb892ec7f re PR objc/18971 (Can't send messages to methods with arrays as parameters)
[gcc/objc/ChangeLog]
2004-12-30  Ziemowit Laski  <zlaski@apple.com>

        PR objc/18971
        * objc-act.c (get_arg_type_list, start_method_def): Decay
        array arguments into pointers.
        (gen_type_name_0): Learn to pretty-print array types.

[gcc/testsuite/ChangeLog]
2004-12-30  Alexander Malmberg  <alexander@malmberg.org>
            Ziemowit Laski  <zlaski@apple.com>

        PR objc/18971
        * objc.dg/encode-5.m: New test.

From-SVN: r92731
2004-12-30 10:18:18 +00:00
Ziemowit Laski 035e8f0149 objc-act.c (build_private_template): Change to return 'void'...
[gcc/objc/ChangeLog]
2004-12-15  Ziemowit Laski  <zlaski@apple.com>

	* objc-act.c (build_private_template): Change to return 'void'; do
	not set ivar_context, uprivate_record or objc_instance_type.
	(objc_comptypes, gen_type_name_0): For types 'id' and 'Class',
	retrieve protocol list from the pointee rather than the pointer itself;
	check TYPE_HAS_OBJC_INFO(...) precondition before accessing
	TYPE_OBJC_PROTOCOL_LIST.
	(objc_get_protocol_qualified_type): For types 'id' and 'Class',
	construct a variant of the pointee as well as the pointer, and
	store protocol information in the former.  When creating variants
	of RECORD_TYPEs, clone their TYPE_LANG_SPECIFIC fields and propagate
	TYPE_OBJC_INTERFACE information.
	(objc_declare_class): If a TYPE_DECL is looked up, retrieve the
	underlying RECORD_TYPE to check for presence of TYPE_OBJC_INTERFACE;
	for newly-created RECORD_TYPEs, create a tentative TYPE_OBJC_INTERFACE
	holding an IDENTIFIER_NODE.
	(objc_finish_message_expr): Check TYPE_HAS_OBJC_INFO(...) before
	accessing TYPE_OBJC_PROTOCOL_LIST; Use TYPE_OBJC_INTERFACE instead
	of calling lookup_interface(); allow for TYPE_OBJC_INTERFACE holding
	an IDENTIFIER_NODE (meaning a @class forward-declaration only).
	(objc_is_public): Check TYPE_OBJC_INTERFACE instead of calling
	lookup_interface().
	(continue_class): For @implementations, set ivar_context,
	uprivate_record and objc_instance_type, for @interfaces, call
	build_private_template().
	(encode_pointer): Check TYPE_HAS_OBJC_INFO(...) before accessing
	TYPE_OBJC_INTERFACE.
	(objc_types_are_equivalent): Check TYPE_HAS_OBJC_INFO(...) before
	accessing TYPE_OBJC_PROTOCOL_LIST.
	* objc-act.h (OBJC_INFO_SLOT_ELTS, TYPE_OBJC_INFO, INIT_TYPE_OBJC_INFO,
	DUP_TYPE_OBJC_INFO, ALLOC_OBJC_TYPE_LANG_SPECIFIC,
	SIZEOF_OBJC_TYPE_LANG_SPECIFIC): New macros.
	(TYPE_OBJC_INTERFACE): Replaces TREE_STATIC_INSTANCE and now points
	to an actual @interface; stored in TYPE_LANG_SPECIFIC(...).
	(TYPE_OBJC_PROTOCOL_LIST): Replaces TYPE_PROTOCOL_LIST; stored in
	TYPE_LANG_SPECIFIC(...).
	(TREE_STATIC_INSTANCE, TYPE_PROTOCOL_LIST): Delete.
	(IS_ID, IS_CLASS, IS_PROTOCOL_QUALIFIED_UNTYPED, IS_SUPER,
	TYPED_OBJECT): Check for POINTER_TYPE rather than POINTER_TYPE_P;
	adjust for use of TYPE_OBJC_INTERFACE and TYPE_OBJC_PROTOCOL_LIST
	instead of TREE_STATIC_INSTANCE and TYPE_PROTOCOL_LIST.

From-SVN: r92239
2004-12-16 01:10:38 +00:00
Joseph Myers 86f029aa95 [multiple changes]
2004-11-29  Daniel Jacobowitz  <dan@codesourcery.com>

	PR c/7544
	* Makefile.in (c-lang.o): Update dependencies.
	* c-lang.c: Include "c-pragma.h".
	(finish_file): Call maybe_apply_pending_pragma_weaks.
	* c-pragma.c (maybe_apply_pending_pragma_weaks): New function.
	* c-pragma.h (maybe_apply_pending_pragma_weaks): New prototype.

cp:
2004-11-29  Daniel Jacobowitz  <dan@codesourcery.com>

	* Make-lang.in (cp/decl2.o): Update dependencies.
	* decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.

objc:
2004-11-29  Joseph Myers  <joseph@codesourcery.com>

	* Make-lang.in (objc/objc-act.o): Update dependencies.
	* objc-act.c (objc_finish_file): Call
	maybe_apply_pending_pragma_weaks if not OBJCPLUS.

testsuite:
2004-11-29  Joseph Myers  <joseph@codesourcery.com>

	* g++.dg/ext/weak1.C, gcc.dg/weak/weak-10.c, objc.dg/weak-1.m: New
	tests.

From-SVN: r91479
2004-11-29 18:54:06 +00:00
Andrew Pinski 3172e26ca4 re PR objc/18406 (ICE compiling Objective C code with long double arguments)
2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>

        PR objc/18406
        * obj-act.c (encode_type): 96bits doubles are encoded the
        same way as 64bit and 128bit doubles are.

2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>

        PR objc/18406
        * objc/compile/pr18406.m: New test.

From-SVN: r90361
2004-11-09 11:44:38 -08:00
Joseph Myers 9e637a2679 builtins.c, [...]: Avoid "`" as left quote, using "'" or %q, %< and %> as appropriate.
* builtins.c, c-common.c, c-decl.c, c-format.c, c-format.h,
	c-parse.in, c-pch.c, c-pragma.c, collect2.c, final.c, gcc.c,
	gcov.c, opts.c, pretty-print.h, protoize.c, reg-stack.c, rtl.c,
	tlink.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c,
	config/avr/avr.c, config/c4x/c4x.c, config/darwin.c,
	config/frv/frv.c, config/h8300/h8300.c, config/i386/i386.c,
	config/i386/winnt.c, config/ia64/ia64.c, config/ip2k/ip2k.c,
	config/iq2000/iq2000.c, config/m32r/m32r.c,
	config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/m68k/m68k.h,
	config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c,
	config/ns32k/ns32k.c, config/rs6000/host-darwin.c,
	config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c,
	config/sh/symbian.c, config/stormy16/stormy16.c,
	config/v850/v850.c: Avoid "`" as left quote, using "'" or %q, %<
	and %> as appropriate.  Use %' as apostrophe in diagnostics where
	applicable.  Use %< and %> in place of '' quotes where applicable.
	Use %qs in place of %<%s%>.  Consistently quote __builtin function
	names.

ada:
	* misc.c (gnat_handle_option): Use %< and %> for quoting in
	warning message.

cp:
	* call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
	pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
	quoting in diagnostics.
	* parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
	quoting in printf format.
	* decl.c (duplicate_decls, start_decl): Use %qD instead of
	unquoted %D.

objc:
	* objc-act.c: Use %q, %< and %> for quoting in diagnostics.

testsuite:
	* gcc.dg/builtin-prefetch-1.c: Adjust expected messages.

From-SVN: r90337
2004-11-09 10:13:30 +00:00
Andrew Pinski 3a723ff6e5 re PR objc/16546 ([unit-at-a-time] Solaris 10/x86 libobjc bootstrap failure: invalid assembler code)
2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>

        PR objc/16546
        * objc-act.c (generate_method_descriptors): Remove setting
        the new decls' type to variable_length_type.
        (generate_ivar_lists): Likewise.
        (generate_dispatch_tables): Likewise.

From-SVN: r90304
2004-11-08 13:34:36 -08:00
Ziemowit Laski 16b34ad662 c-common.h (objc_lookup_ivar): Add second parameter to prototype.
[gcc/ChangeLog]
2004-10-30  Ziemowit Laski  <zlaski@apple.com>

        * c-common.h (objc_lookup_ivar): Add second parameter to
        prototype.
        * c-typeck.c (build_external_ref): After looking up symbol,
        pass it to objc_lookup_ivar() to decide whether it or the
        ivar should be used, rather than deciding the issue locally.
        * stub-objc.c (objc_lookup_ivar): Add an OTHER parameter,
        which is simply returned in the non-ObjC case.

[gcc/objc/ChangeLog]
2004-10-30  Ziemowit Laski  <zlaski@apple.com>

        * objc-act.c (objc_lookup_ivar): The new OTHER parameter
        contains the result of the ID lookup by the C or C++
        front-end; in class methods, use OTHER if it exists;
        in instance methods, use OTHER only if it is locally
        declared.

[gcc/testsuite/ChangeLog]
2004-10-30  Ziemowit Laski  <zlaski@apple.com>

        * objc.dg/local-decl-1.m: New test.

From-SVN: r89912
2004-10-31 06:17:55 +00:00
Ziemowit Laski 38285932ea objc-act.c (finish_class): Do not synthesize bogus 'extern objc_object *_Foo;' declarations for @interface Foo.
[gcc/objc/ChangeLog]
2004-10-26  Ziemowit Laski  <zlaski@apple.com>

        * objc-act.c (finish_class): Do not synthesize bogus
        'extern objc_object *_Foo;' declarations for @interface Foo.

[gcc/testsuite/ChangeLog]
2004-10-26  Ziemowit Laski  <zlaski@apple.com>

        * objc.dg/super-class-3.m: New test.

From-SVN: r89601
2004-10-26 18:39:01 +00:00
Ziemowit Laski 3a3589b4ba c-common.h: Remove RID_ID.
[gcc/ChangeLog]
2004-10-25  David Ayers  <d.ayers@inode.at>

	* c-common.h: Remove RID_ID.
	* c-parse.in: Remove OBJECTNAME and references to RID_ID.
	(typespec_reserved_attr): Add rule for TYPENAME
	non_empty_protocolrefs.
	(yylexname): Remove special handling of RID_ID.

[gcc/objc/ChangeLog]
2004-10-25  Ziemowit Laski  <zlaski@apple.com>
	    David Ayers  <d.ayers@inode.at>

	* objc-act.c (objc_comptypes): Use IS_PROTOCOL_QUALIFIED_UNTYPED
	instead of IS_PROTOCOL_QUALIFIED_ID; add comparisons for:
	'Class <Protocol> != id <Protocol>'; 'Class <Protocol> != <class> *';
	'Class <Protocol> == id' and 'Class <Protocol> == Class'.
	(objc_is_id): Add test for 'super'.
	(objc_finish_message_expr): Allow for messaging of 'Class <Proto>'
	receivers; if class methods are not found in protocol lists, search
	for instance methods therein and warn if one is found.  Look in
	global hash tables for suitable method as a last resort when messaging
	'id <Proto>', 'Class <Proto>' and invalid receiver types.
	(objc_add_method): Insert instance methods listed in protocols into
	the global class method hash table.
	* objc-act.h (IS_PROTOCOL_QUALIFIED_ID): Rename to
	IS_PROTOCOL_QUALIFIED_UNTYPED and allow for 'Class <Proto>' in
	addition to 'id <Proto>'.

[gcc/testsuite/ChangeLog]
2004-10-25  David Ayers  <d.ayers@inode.at>
	    Ziemowit Laski  <zlaski@apple.com>

	* objc.dg/call-super-2.m: Add messages to 'Class <Proto>'; update
	diagnostics when messaging 'id <Proto>'.
	* objc.dg/class-protocol-1.m: New test.
	* objc.dg/desig-init-1.m: Add message to an invalid receiver using
	a non-existent method signature.
	* objc.dg/method-5.m, objc.dg/method-6.m, objc.dg/proto-hier-1.m:
	Update diagnostics when messaging with non-existent method signature.
	* objc.dg/proto-hier-2.m: Adjust wording of diagnostic.
	* objc.dg/proto-lossage-1.m, objc.dg/proto-lossage-4.m: Messages to
	invalid receivers are now resolved as if messaging 'id'; remove
	extraneous diagnostics.

From-SVN: r89562
2004-10-25 22:55:25 +00:00
Andrew Pinski 943db34743 re PR objc/17923 (const-str-[34].m fails on the mainline (next runtime))
2004-10-21  Andrew Pinski  <pinskia@physics.uc.edu>

        PR objc/17923
        * tree.c (staticp): A CONST_DECL has static storage if either
        TREE_STATIC or DECL_EXTERNAL is set.
        * c-decl.c (pushdecl_top_level): Accept CONST_DECLs which can
        have null names.

2004-10-21  Andrew Pinski  <pinskia@physics.uc.edu>

        PR objc/17923
        * objc-act.c (objc_build_string_object): Create a CONST_DECL
        for the NeXT runtime case.

2004-10-21  Andrew Pinski  <pinskia@physics.uc.edu>

        PR objc/17923
        * objc.dg/const-str-7.m: New test.

From-SVN: r89384
2004-10-21 09:29:58 -07:00
Kazu Hirata c72f8eec54 * objc-act.c: Fix comment typos.
From-SVN: r88426
2004-10-02 15:56:06 +00:00
Ziemowit Laski 14214f0951 objc-act.c (init_objc_symtab, [...]): When initializing 'long' fields, ensure that the initializer value is also 'long'.
[gcc/objc/ChangeLog]
2004-09-24  Ziemowit Laski  <zlaski@apple.com>

	* objc-act.c (init_objc_symtab, init_module_descriptor,
	build_shared_structure_initializer): When initializing 'long'
	fields, ensure that the initializer value is also 'long'.

From-SVN: r88079
2004-09-24 23:15:33 +00:00
Zack Weinberg dd3017e4e5 objc-act.c: Change annotate_with_locus to SET_EXPR_LOCATION throughout.
objc:
	* objc-act.c: Change annotate_with_locus to SET_EXPR_LOCATION
	throughout.
	(objc_init): Only set input_line to 0 #ifndef USE_MAPPED_LOCATION.
	(build_selector_translation_table): Use %J in diagnostic
	instead of diddling input_line.  Fix spelling.
testsuite:
	* objc.dg/proto-lossage-4.m: Use long instead of int to avoid
	extra diagnostics on targets with 64-bit pointers.
	* objc.dg/selector-1.m: Adjust dg-warning regexp.

From-SVN: r88072
2004-09-24 21:38:08 +00:00
Ziemowit Laski 86c440722e objc-act.c (objc_fold_objc_type_ref): New function.
[gcc/objc/ChangeLog]
2004-09-21  Ziemowit Laski  <zlaski@apple.com>

        * objc-act.c (objc_fold_objc_type_ref): New function.
        * objc-act.h (objc_fold_objc_type_ref): New prototype.

From-SVN: r87838
2004-09-22 01:13:07 +00:00
Zack Weinberg 9aa44508a8 Makefile.in (c-parse.o): Depend on $(C_PRAGMA_H).
* Makefile.in (c-parse.o): Depend on $(C_PRAGMA_H).
	* objc/Make-lang.in (objc/objc-parse.o): Likewise.

From-SVN: r87689
2004-09-18 01:07:25 +00:00
Jeffrey D. Oldham 6615c44615 alias.c (find_base_decl): Remove unreachable case '3' block.
2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
	    Zack Weinberg  <zack@codesourcery.com>

	* alias.c (find_base_decl): Remove unreachable case '3' block.
	* expr.c (safe_from_p): Abort if passed a type.
	* tree-gimple.c (recalculate_side_effects): Abort if passed
	anything other than an expression.
	* tree-ssa-pre.c (phi_translate): Return expr immediately if
	is_gimple_min_invariant is true for it.  Reorder cases for clarity.
	Abort on un-handled tree classes.
	(valid_in_set): Likewise.
	* tree.c (tree_code_class_strings): New static data.

	* tree.h (enum tree_code_class): New.
	(tree_code_class_strings): Declare.
	(TREE_CODE_CLASS_STRING, EXCEPTIONAL_CLASS_P, CONSTANT_CLASS_P)
	(REFERENCE_CLASS_P, COMPARISON_CLASS_P, UNARY_CLASS_P, BINARY_CLASS_P)
	(STATEMENT_CLASS_P, EXPRESSION_CLASS_P, IS_TYPE_OR_DECL_P): New macros.
	(TYPE_P, DECL_P, IS_NON_TYPE_CODE_CLASS, IS_EXPR_CODE_CLASS)
	(checking macros, EXPR_LOCATION, SET_EXPR_LOCATION, EXPR_LOCUS): Update.

	* tree.def, c-common.def, objc/objc-tree.def: Use
	tree_code_class enumeration constants instead of code letters.

	* alias.c, builtins.c, c-common.c, c-format.c, c-lang.c, c-pragma.c
	* c-typeck.c, cgraphunit.c, convert.c, dbxout.c, dwarf2out.c
	* emit-rtl.c expr.c, fold-const.c, gimplify.c, lambda-code.c
	* langhooks.c, langhooks.h, predict.c, print-tree.c, reload1.c, stmt.c
	* tree-browser.c, tree-cfg.c, tree-chrec.c, tree-complex.c, tree-dfa.c
	* tree-dump.c, tree-eh.c, tree-gimple.c, tree-inline.c, tree-nested.c
	* tree-outof-ssa.c, tree-pretty-print.c, tree-sra.c, tree-ssa-ccp.c
	* tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-forwprop.c, tree-ssa-live.c
	* tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-operands.c
	* tree-ssa-phiopt.c, tree-ssa-pre.c, tree-ssa-propagate.c
	* tree-ssa.c, tree-ssanames.c, tree-tailcall.c, tree.c, varasm.c
	* config/sol2-c.c, config/arm/arm.c, config/i386/winnt.c
	* config/pa/pa.c, config/pa/pa.h, config/sh/sh.c, objc/objc-lang.c
	Update to match.

	* LANGUAGES: Add note about change.

ada:
	* ada-tree.def: Use tree_code_class enumeration constants
	instead of code letters.
	* ada-tree.h, decl.c, misc.c, trans.c, utils.c, utils2.c:
	Update for new tree-class enumeration constants.

cp:
	* cp-tree.def: Use tree_code_class enumeration constants
	instead of code letters.
	* call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
	* mangle.c, pt.c, semantics.c, tree.c, typeck.c:
	Update for new tree-class enumeration constants.

fortran:
	* f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
	enumeration constants.

java:
	* java-tree.def: Use tree_code_class enumeration constants
	instead of code letters.
	* java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
	new tree-class enumeration constants.

treelang:
	* treetree.c: Update for new tree-class enumeration constants.

From-SVN: r87675
2004-09-17 21:55:02 +00:00
Joseph Myers f8893e4723 c-tree.h (enum c_declarator_kind, [...]): New.
* c-tree.h (enum c_declarator_kind, struct c_arg_info, struct
	c_declarator, struct c_type_name, struct c_parm): New.
	(build_array_declarator, set_array_declarator_inner,
	get_parm_info, grokfield, groktypename, grokparm, push_parm_decl,
	start_function, start_decl, build_c_parm, build_attrs_declarator,
	build_function_declarator, make_pointer_declarator, c_cast_expr,
	store_parm_decls_newstyle, c_expr_sizeof_type): Update prototypes.
	(build_id_declarator): New.
	* c-typeck.c (c_cast_expr, c_expr_sizeof_type): Update to new
	structures.
	* c-decl.c (ARG_INFO_PARMS, ARG_INFO_TAGS, ARG_INFO_TYPES,
	ARG_INFO_OTHERS): Remove.
	(build_id_declarator): New.
	(build_array_declarator, set_array_declarator_inner, groktypename,
	start_decl, grokparm, push_parm_decl, grokparms, get_parm_info,
	grokfield, start_function, store_parm_decls_newstyle,
	store_parm_decls_oldstyle, store_parm_decls,
	build_c_parm, build_attrs_declarator, build_function_declarator,
	make_pointer_declarator, grokdeclarator): Update to new
	structures.
	* c-parse.in (%union): Add arginfotype, dtrtype, typenametype and
	parmtype.
	(declarator, notype_declarator, after_type_declarator,
	parm_declarator, parm_declarator_starttypename,
	parm_declarator_nostarttypename, array_declarator, typename,
	absdcl, absdcl1, absdcl1_ea, absdcl1_noea, direct_absdcl1,
	absdcl_maybe_attribute, parm, firstparm, parms, parmlist,
	parmlist_1, parmlist_2, parmlist_or_identifiers,
	parmlist_or_identifiers_1): Use these types.
	(primary, after_type_declarator, parm_declarator_starttypename,
	notype_declarator, component_decl, component_declarator,
	component_notype_declarator, typename, absdcl,
	absdcl_maybe_attribute, absdcl1_ea, direct_absdcl1, parmlist_1,
	parmlist_2, parmlist_or_identifiers_1): Update to new structures.

objc:
	* objc-act.c (objc_start_function, really_start_method,
	objc_get_parm_info, start_method_def): Update to new arg_info
	structures.

From-SVN: r87217
2004-09-09 02:19:15 +01:00
Ziemowit Laski 6408ef3386 Makefile.in (c-parse.o): Depend on $(C_COMMON_H).
[gcc/ChangeLog]
2004-09-07  Ziemowit Laski  <zlaski@apple.com>

	* Makefile.in (c-parse.o): Depend on $(C_COMMON_H).
	* c-parse.in: Include c-common.h instead of objc-act.h.
	(ivar_decl_list, ivar_decls, ivar_decl, ivars, ivar_declarator,
	myparms, myparm): Remove %type declarations.
	(methodtype, optparms, OBJC_TYPE_QUAL, objc_quals, objc_qual,
	objc_typename, objc_try_catch_stmt, optellipsis): Add %type
	declarations.
	(objc_inherit_code, objc_public_flag): Remove.
	(typespec_nonreserved_nonattr): Call
	objc_get_protocol_qualified_type() instead of get_static_reference()
	and get_protocol_reference().
	(stmt_nocomp): Call grokparm() on @catch parameter.
	(objcdef): Move semantic action to objc_finish_implementation().
	(classdef): Move semantic action to objc_start_class_interface(),
	objc_continue_interface(), objc_finish_interface(),
	objc_start_class_implementation(), objc_continue_implementation(),
	objc_start_category_interface() and
	objc_start_category_implementation().
	(protocoldef): Move semantic actions to objc_start_protocol() and
	objc_finish_interface().
	(ivar_decl_list): Remove nonterminal.
	(visibility_spec): Move semantic actions to objc_set_visibility().
	(ivar_decls): Remove assignment to $$.
	(ivar_decl): Rephrase in terms of component_decl; call
	objc_add_instance_variable().
	(ivars, ivar_declarator): Remove nonterminals.
	(opt_semi): New nonterminal.
	(methodtype): Remove semantic actions.
	(methoddef): Move semantic actions to objc_set_method_type(),
	objc_start_method_definition() and objc_finish_method_definition().
	(methodproto): Move semantic actions to objc_set_method_type() and
	objc_add_method_declaration().
	(methoddecl): Use objc_typename instead of typename; move semantic
	actions to objc_build_method_signature().
	(optarglist, myxdecls, mydecl, myparms, myparm): Remove nonterminals.
	(optparmlist): Express in terms of optparms and optellipsis.
	(optparms, optellipsis, objc_qual, objc_quals, objc_typename): New
	nonterminals.
	(keyworddecl): Use objc_typename instead of typename.
	(rid_to_yy): Mark RID_IN, RID_OUT, RID_INOUT, RID_BYCOPY, RID_BYREF
	and RID_ONEWAY as returning OBJC_TYPE_QUAL to yyparse().

[gcc/objc/ChangeLog]
2004-09-07  Ziemowit Laski  <zlaski@apple.com>

	* Make-lang.in (objc/objc-parse.o): Depend on $(C_COMMON_H) instead of
	objc/objc-act.h.
	(objc/objc-act.o): Depend on $(HASHTAB_H).
	* objc-act.c: Include hashtab.h; in ObjC++ mode, include cp-tree.h and
	objcp-decl.h instead of c-tree.h.
	(build_module_descriptor, get_class_ivars, synth_id_with_class_suffix,
	error_with_ivar, gen_method_decl, gen_declaration, setup_string_decl,
	build_protocol_template): Adjust prototypes.
	(build_module_initializer_routine, start_class, continue_class,
	finish_class, start_method_def, objc_start_function, start_protocol,
	build_method_decl, objc_add_method, add_instance_variable,
	build_ivar_reference, is_ivar, is_private, get_super_receiver,
	build_selector_table_decl, objc_push_parm, objc_get_parm_info,
	gen_type_name, gen_type_name_0, start_var_decl, finish_var_decl,
	create_field_decl): New prototypes.
	(objc_expand_function_end, comp_method_with_proto, objc_expr_last,
	gen_declaration_1, gen_declarator, is_complex_decl, adorn_decl,
	define_decl, create_builtin_decl, gen_declspecs): Remove prototypes.
	(TYPE_ID): Rename to OBJECT_TYPEDEF_NAME.
	(CLASS_TYPEDEF_NAME): New.
	(TAG_EXECCLASS): Change from a global variable to a #define.
	(TAG_RETURN_STRUCT): Delete.
	(TAG_GNUINIT): New, holds '__objc_gnu_init' name.
	(objc_inherit_code, objc_public_flag): New, moved from c-parse.in.
	(string_descriptor): New struct.
	(string_htab): New hash table.
	(string_hash, string_eq): New prototypes.
	(generate_struct_by_value_array): Call create_field_decl() instead of
	create_builtin_decl().
	(objc_init): Do not initialize objc_ellipsis_node or TAG_EXECCLASS;
	In ObjC++ mode, call cxx_init() instead of c_objc_common_init().
	(objc_finish_file): In ObjC++, call instantiate_pending_templates()
	and cp_finish_file().
	(define_decl, get_static_reference, get_protocol_reference,
	create_builtin_decl): Remove functions.
	(objc_start_class_interface, objc_start_category_interface,
	objc_start_protocol, objc_continue_interface, objc_finish_interface,
	objc_start_class_implementation, objc_start_category_implementation,
	objc_continue_implementation, objc_finish_implementation,
	objc_set_visibility, objc_set_method_type,
	objc_build_method_signature, objc_add_method_declaration,
	objc_start_method_definition, objc_add_instance_variable,
	objc_get_protocol_qualified_type, create_field_decl,
	start_var_decl, finish_var_decl): New functions.
	(setup_string_decl): Simplify since it is only called once.
	(synth_module_prologue): Call build_class_template(); predefine 'id'
	and 'Class' as typedefs; rename 'temp_type' to 'type'; disable debug
	hooks for duration of function; fix GNU runtime messenger signatures
	to correspond to reality; forward-declare '__objc_exec_class' for the
	GNU runtime; call build_selector_table_decl(); in ObjC++ mode, generate
	'extern "C" { ... }' wrappers around synthesized declarations; call
	build_protocol_template() and build_category_template().
	(string_hash, string_eq): New functions.
	(objc_build_string_object): Check metaclass correctness only once;
	store string literals in hash table.
	(objc_build_constructor): Do not convert initializer elements;
	adjust for ObjC++ impedance mismatch.
	(build_objc_symtab_template): Call create_field_decl() instead of
	create_builtin_decl().
	(init_objc_symtab): Add missing conversion to initializer element.
	(build_metadata_decl): Call start_var_decl() instead of define_decl().
	(generate_objc_symtab_decl): Do not call build_category_template();
	call start_var_decl() and finish_var_decl() instead of start_decl()
	and finish_decl().
	(build_module_descriptor): Call create_field_decl() instead of
	grokfield(); call start_var_decl() and finish_var_decl() instead of
	start_decl() and finish_decl(); always mark module descriptor as
	used; move GNU runtime-specific functionality to
	build_module_initializer_routine().
	(build_module_initializer_routine): New function, broken off of
	build_module_descriptor().
	(objc_static_init_needed_p, objc_generate_static_init_call): New
	functions.
	(generate_static_references, generate_strings,
	build_selector_translation_table, generate_descriptor_table,
	generate_ivars_list, generate_dispatch_table, generate_category): Call
	start_var_decl() and finish_var_decl() instead of start_decl() and
	finish_decl(); build a type directly instead of via groktypename().
	(build_selector_reference_decl, build_selector_table_decl,
	build_class_reference_decl, build_protocol_reference,
	generate_objc_image_info): Call start_var_decl() instead of
	build_decl().
	(build_selector_reference): For GNU runtime, do not call
	build_selector_reference_decl().
	(build_selector, build_typed_selector_reference): Always convert
	result to the selector type.
	(add_objc_string): Cast return value to 'char *'.
	(build_method_prototype_template, build_selector_template,
	build_method_template): Use actual selector type for fields
	pointing to selectors.
	(finish_objc): For GNU runtime, call
	build_module_initializer_routine() after build_module_descriptor().
	(generate_protocol_list, generate_shared_structures): Call
	start_var_decl() and finish_var_decl() instead of start_decl() and
	finish_decl(); build a type directly instead of via
	groktypename().
	(synth_id_with_class_suffix): Return a string.
	(get_arg_type_list): For instance methods, use the instance type for
	'self'; do not call groktypename_in_parm_context().
	(build_objc_string_decl): Squash redeclaration errors in ObjC++.
	(objc_is_class_name): Use OBJC_TYPE_NAME instead of TYPE_NAME;
	handle RECORD_TYPEs in ObjC as well as ObjC++.
	(objc_is_id): New function.
	(objc_is_object_ptr): Return the canonical type node.
	(objc_get_class_ivars): Simplify using get_class_ivars().
	(get_class_ivars): Remove second parameter; create a fresh copy
	of the ivar list for each call; do not check for existence of
	super class.
	(objc_eh_runtime_type): Mark #ifndef OBJCPLUS.
	(objc_init_exceptions): When using SJLJ-style exceptions, require
	the use of '-fobjc-exceptions' flag; do not require it for DWARF-style
	exceptions.
	(objc_build_exc_ptr, next_sjlj_build_try_catch_finally): Use
	objc_object_type instead of objc_id_type.
	(objc_begin_catch_clause): Convert the incoming PARM_DECL into
	a VAR_DECL before placing it in the appropriate scope; do not
	call define_decl(); adjust call to c_begin_compound_stmt();
	use objc_object_type instead of objc_id_type.
	(build_next_objc_exception_stuff): Call create_field_decl() instead
	of create_builtin_decl(); construct type directly instead of calling
	groktypename(); use OBJC_VOID_AT_END to mark end of function parameters.
	(build_private_template): Adjust call to get_class_ivars(); build
	a type directly instead of via groktypename().
	(build_protocol_template, build_method_prototype_list_template,
	build_method_prototype_template, build_category_template,
	build_selector_template, build_class_template, build_super_template,
	build_ivar_template, build_ivar_list_template,
	build_method_list_template, build_method_template):
	Call create_field_decl() instead of grokfield().
	(objc_method_parm_type): Do not call groktypename().
	(generate_descriptor_table): Call start_var_decl() and
	finish_var_decl() instead of start_decl() and finish_decl().
	(generate_method_descriptors, build_protocol_initializer,
	generate_dispatch_tables, build_category_initializer,
	build_shared_structure_initializer): Do not call groktypename().
	(generate_protocols): Call start_var_decl() and finish_var_decl()
	instead of start_decl() and finish_decl(); do not call groktypename().
	(error_with_ivar): Remove last parameter.
	(check_ivars): Do not iterate ovar CLASS_RAW_IVARS lists in addition
	to CLASS_IVARS lists; adjust calls to error_with_ivar().
	(generate_ivar_lists): Convert one of the initializer elements; do
	not call groktypename().
	(get_arg_type_list, start_method_def, gen_method_def): Account for
	new representation of variable arguments and '...' in Objective-C
	methods; add Objective-C++ impedance matching code.
	(is_objc_type_qualifier): Remove function.
	(adjust_type_for_id_default): Simplify; there is no longer a need to
	wade through declspecs.
	(lookup_interface, start_class, continue_class,
	finish_class, start_method_def, start_protocol, build_method_decl,
	objc_add_method, add_instance_variable, build_ivar_reference,
	is_ivar, is_private, get_super_receiver, objc_build_finally_epilogue):
	Make into static functions.
	(receiver_is_class_object): Use new IS_CLASS() macro.
	(objc_build_message_expr): Tweak ObjC++ message argument handling;
	call objc_finish_message_expr() instead of finish_message_expr().
	(finish_message_expr): Rename to objc_finish_message_expr(); use
	OBJC_TYPE_NAME and OBJC_SET_TYPE_NAME macros instead of TYPE_NAME.
	call gen_type_name() instead of gen_declaration(); call objc_is_id()
	instead of using IS_ID and IS_CLASS; Use objc_class_name instead of
	calling get_identifier("Class"); handle CONVERT_EXPRs in receiver.
	(build_objc_method_call, warn_with_method): Do not call groktypename().
	(build_ivar_reference): Call convert() instead of clobbering in a
	type.
	(hash_init): Initialize string_htab hash table.
	(add_instance_variable): Simplify parameter list; do not call grokfield();
	do not populate CLASS_IVARS list.
	(start_class): Check for the existence of super class, if one was specified.
	(continue_class): Use CLASS_RAW_IVARS rather than CLASS_IVARS; do not
	call build_class_template(); adjust call to get_class_ivars(); call
	build_decl(), pushdecl() and finish_decl() instead of define_decl().
	(finish_class): Call build_decl(), pushdecl() and finish_decl() instead
	of define_decl().
	(add_protocols): Use PROTOCOL_BINFO_ELTS for the tree vector size.
	(start_protocol): Do not call build_protocol_template(); use
	PROTOCOL_BINFO_ELTS for the tree vector size.
	(encode_type_qualifiers): Do not handle the 'const' qualifier here.
	(encode_pointer): Encode 'const char *' as 'r*', for backwards
	compatibility.
	(encode_array): Use HOST_WIDE_INT_PRINT_DEC instead of "%ld".
	(encode_type): Handle the 'const' qualifier here.
	(objc_parmlist): New global variable, sued by objc_push_parm and
	objc_get_parm_info().
	(objc_push_parm, objc_get_parm_info): New functions.
	(objc_expr_last): Remove function.
	(synth_self_and_ucmd_args): For instance methods, use the instance
	type for 'self'; call objc_push_parm() instead of push_parm_decl().
	(start_method_def): Do not call push_scope(), declare_parm_level(),
	pop_scope(), push_parm_decl(), store_parm_decls() or objc_expr_last();
	just use objc_push_parm() and objc_get_parm_info().
	(comp_method_with_proto): Remove function.
	(objc_types_are_equivalent): Strip away indirections before comparing
	underlying types.
	(comp_proto_with_proto): Do not call groktypename(); types are no
	longer in raw declspec format.
	(objc_start_function): New function.
	(really_start_method): Call comp_proto_with_proto() instead of
	comp_method_with_proto(); call objc_start_function() instead of
	hand-crafting a function declarator.
	(continue_method_def, objc_expand_function_end): Remove functions.
	(get_super_receiver): Call objc_get_current_scope() instead of
	get_current_scope(); reference 'super_class' field (instead of
	'class').
	(finish_method_def): Rename to objc_finish_method_definition() and
	add a function decl parameter; move method encoding call from
	objc_expand_function_end().
	(is_complex_decl, adorn_decl, gen_declarator, gen_declspecs,
	gen_declaration_1): Remove functions.
	(tmpbuf, RAW_DECLSPEC): Remove.
	(gen_declaration): Remove second parameter; simplify to deal
	with TYPE_P nodes instead of raw declspecs.
	(gen_type_name, gen_type_name_0): New functions.
	(gen_method_decl): Remove second parameter; call gen_type_name()
	instead of gen_declaration_1().
	(dump_interface): Adjust calls to gen_declaration() and
	gen_method_decl(); do not allocate a separate string buffer.
	(init_objc): Allocate a larger string buffer to accommodate
	dump_interface(); adjust call to build_module_descriptor();
	add call to build_module_initializer_routine() for the GNU
	runtime.
	(generate_classref_translation_entry): Do not call start_decl(); call
	finish_var_decl() instead of finish_decl(); call convert() instead of
	build_c_cast().
	* objc-act.h (CLASS_OWN_IVARS): Remove accessor.
	(CLASS_BINFO_ELTS): Reduce from 6 to 5, now that CLASS_OWN_IVARS is
	gone.
	(OCTI_GNU_INIT_DECL, GNU_INIT_decl): New.
	(OCTI_ELLIPSIS_NODE, objc_ellipsis_node): Remove.
	(OCTI_ID_ID, id_type, objc_id_id): Rename to OCTI_ID_NAME,
	objc_object_type and objc_object_name, respectively.
	(OCTI_CLS_REF, OCTI_CLASS_NAME, objc_class_reference,
	objc_class_name): New.
	(IS_CLASS): New macro.
	(IS_ID, IS_SUPER): Robustify.
	(OCTI_EXECCLASS_DECL, execclass_decl): New.
	(finish_file, start_class, continue_class, finish_class,
	start_method_def, continue_method_def, finish_method_def,
	start_protocol, finish_protocol, objc_build_throw_stmt,
	objc_build_try_catch_finally_stmt, objc_build_synchronized_prologue,
	objc_build_synchronized_epilogue, objc_build_try_prologue,
	objc_build_try_epilogue, objc_build_catch_stmt, objc_build_catch_epilogue,
	objc_build_finally_prologue, objc_build_finally_epilogue,
	is_ivar, is_private, is_public, add_instance_variable, objc_add_method,
	get_super_receiver, objc_clear_super_receiver, get_class_ivars_from_name,
	get_class_reference, get_static_reference, get_object_reference,
	build_message_expr, finish_message_expr, build_selector_expr,
	build_ivar_reference, build_keyword_decl, build_method_decl,
	build_protocol_expr, build_objc_string_object, objc_declare_alias,
	objc_declare_class, objc_declare_protocols, objc_comptypes,
	objc_check_decl, build_encode_expr): Remove prototypes.
	(imp_count, cat_count): Make GGC-aware.
	(OBJC_SET_TYPE_NAME): New macro.

From-SVN: r87168
2004-09-08 00:49:44 +00:00
Ziemowit Laski 1970d8c546 config-lang.in: Update copyright notice.
[gcc/objc/ChangeLog]
2004-09-03  Ziemowit Laski  <zlaski@apple.com>

	* config-lang.in: Update copyright notice.
	(lang_requires): Indicate that ObjC requires C to be built first.

From-SVN: r87053
2004-09-03 20:30:37 +00:00
Ziemowit Laski 57a6af27ed c-parse.in (primary): Call objc_build_message_expr()...
[gcc/ChangeLog]
2004-09-01  Ziemowit Laski  <zlaski@apple.com>

	* c-parse.in (primary): Call objc_build_message_expr(),
	objc_build_selector_expr(), objc_build_protocol_expr(),
	objc_build_encode_expr() and objc_build_string_object() instead of
	build_message_expr(), build_selector_expr(), build_protocol_expr(),
	build_encode_expr() and build_objc_string_object(), respectively.
	(component_decl_list2): Call objc_get_class_ivars() instead of
	get_class_ivars_from_name().
	(keyworddecl): Call objc_build_keyword_decl() instead of
	build_keyword_decl().
	(receiver): Call objc_get_class_reference() instead of
	get_class_reference().
	(reswords): Add blank line before @@ifobjc section, for clarity.

[gcc/objc/ChangeLog]
2004-09-01  Ziemowit Laski  <zlaski@apple.com>

	* objc-act.c (objc_check_decl): Use OBJC_TYPE_NAME macro instead of
	TYPE_NAME.
	(build_objc_string_object): Rename to objc_build_string_object().
	(get_class_reference): Rename to objc_get_class_reference().
	(get_class_ivars_from_name): Rename to objc_get_class_ivars().
	(next_sjlj_build_catch_list, get_super_receiver): Call
	objc_get_class_reference() instead of get_class_reference().
	(build_keyword_decl): Rename to objc_build_keyword_decl().
	(build_message_expr): Rename to objc_build_message_expr().
	(build_protocol_expr): Rename to objc_build_protocol_expr().
	(build_selector_expr): Rename to objc_build_selector_expr().
	(build_encode_expr): Rename to objc_build_encode_expr().
	* objc-act.h (get_class_ivars_from_name): Rename prototype to
	objc_get_class_ivars().
	(get_class_reference): Rename prototype to objc_get_class_reference().
	(build_message_expr): Rename prototype to objc_build_message_expr().
	(build_selector_expr): Rename prototype to objc_build_selector_expr().
	(build_keyword_decl): Rename prototype to objc_build_keyword_decl().
	(build_protocol_expr): Rename prototype to objc_build_prototype_expr().
	(build_objc_string_object): Rename prototype to
	objc_build_string_object().

From-SVN: r86950
2004-09-02 00:36:18 +00:00
Ziemowit Laski bc09584679 c-common.h (lookup_interface): Remove prototype.
[gcc/ChangeLog]
2004-09-01  Ziemowit Laski  <zlaski@apple.com>

	* c-common.h (lookup_interface): Remove prototype.
	(is_class_name): Rename to objc_is_class_name.
	(lookup_objc_ivar): Rename to objc_lookup_ivar.
	(get_current_scope): Rename to objc_get_current_scope.
	* c-decl.c (get_current_scope): Rename to objc_get_current_scope.
	* c-parse.in (parmlist_or_identifiers_1): Get rid of unused variable.
	(yylexname): Call objc_is_class_name() instead of is_class_name().
	* c-typeck.c (build_external_ref): Call objc_lookup_ivar()
	instead of lookup_objc_ivar().
	* stub-objc.c (lookup_interface): Remove stub.
	(is_class_name): Rename to objc_is_class_name.
	(lookup_objc_ivar): Rename to objc_lookup_ivar.

[gcc/objc/ChangeLog]
2004-09-01  Ziemowit Laski  <zlaski@apple.com>

	* objc-act.c (lookup_interface): Make function 'static' and add a
	local prototype.
	(objc_check_decl, get_class_reference, objc_declare_alias,
	objc_declare_class, objc_is_object_ptr): Call objc_is_class_name()
	instead of is_class_name().
	(get_super_receiver, objc_clear_super_receiver): Call
	objc_get_current_scope() instead of get_current_scope().
	(is_class_name): Rename to objc_is_class_name.
	(lookup_objc_ivar): Rename to objc_lookup_ivar.

From-SVN: r86879
2004-09-01 07:55:39 +00:00
Ziemowit Laski e5a002e353 c-common.h: Update comments about ObjC/ObjC++ entry points.
[gcc/ChangeLog]
2004-08-28  Ziemowit Laski  <zlaski@apple.com>

	* c-common.h: Update comments about ObjC/ObjC++ entry points.
	(objc_is_reserved_word): New prototype.
	(get_current_scope, objc_mark_locals_volatile): Move prototypes to
	separate section; these are call-backs.
	* c-lex.c (c_lex_with_flags): Call objc_is_reserved_word() to detect
	ObjC/ObjC++ "@" keywords.
	* c-tree.h (get_current_scope, objc_mark_locals_volatile): Remove
	prototypes; they already live in c-common.h.
	* stub-objc.c: Update copyright notice.
	(objc_is_reserved_word): New stub.

[gcc/cp/ChangeLog]
2004-08-28  Ziemowit Laski  <zlaski@apple.com>

	* Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
	CXX_AND_OBJCXX_OBJS.
	(CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
	separately on the link line.

[gcc/objc/ChangeLog]
2004-08-28  Ziemowit Laski  <zlaski@apple.com>

	* objc-act.c (objc_is_reserved_word): New function.

From-SVN: r86702
2004-08-28 20:58:56 +00:00
Nathan Sidwell 7d60be94d6 tree.h (build_int_cst): New, sign extended constant.
* tree.h  (build_int_cst): New, sign extended constant.
	(build_int_cstu): New, zero extended constant.
	(build_int_cst_wide): Renamed from build_int_cst.
	* tree.c (build_int_cst, build_int_cstu): New.
	(build_int_cst_wide): Renamed from build_int_cst.
	(make_vector_type, build_common_tree_nodes,
	build_common_tree_nodes_2): Adjust build_int_cst calls.
	* builtins.c (expand_builtin_prefetch, expand_builtin_strstr,
	expand_builtin_strpbrk, expand_builtin_fputs,
	build_string_literal, expand_builtin_printf,
	expand_builtin_sprintf, fold_builtin_classify_type,
	fold_builtin_lround, fold_builtin_bitop, fold_builtin_isascii,
	fold_builtin_toascii, fold_builtin_isdigit,
	simplify_builtin_strstr, simplify_builtin_strpbrk,
	fold_builtin_fputs, simplify_builtin_sprintf): Likewise.
	* c-common.c (start_fname_decls, fix_string_type, shorten_compare,
	DEF_ATTR_INT): Likewise.
	* c-decl.c (complete_array_type, check_bitfield_type_and_width):
	Likewise.
	* c-lex.c (interpret_integer, lex_charconst): Likewise.
	* c-parse.in (primary) <TYPES_COMPATIBLE_P> Likewise.
	* c-pretty-print.c (pp_c_integer_constant): Likewise.
	* c-typeck.c (really_start_incremental_init, push_init_level,
	set_nonincremental_init_from_string): Likewise.
	* calls.c (load_register_parameters): Likewise.
	convert.c (convert_to_pointer): Likewise.
	coverage.c (coverage_counter_alloc, tree_coverage_counter_ref,
	build_fn_info_type, build_fn_info_value, build_ctr_info_value,
	build_gcov_info): Likewise.
	* except.c (init_eh, assign_filter_values): Likewise.
	* expmed.c (store_fixed_bit_field, extract_bit_field,
	extract_fixed_bit_field, extract_split_bit_field, expand_shift,
	expand_mult_const, expand_mult_highpart_adjust, extract_high_half,
	expand_sdiv_pow2, expand_divmod, make_tree): Likewise.
	* expr.c (convert_move, emit_group_load, emit_group_store,
	expand_assignment, store_constructor, store_field,
	expand_expr_real_1, reduce_to_bit_field_precision): Likewise.
	fold-const.c (force_fit_type, int_const_binop, fold_convert_const,
	invert_truthvalue, optimize_bit_field_compare,
	decode_field_reference, all_ones_mask_p, constant_boolean_node,
	fold_div_compare, fold, fold_read_from_constant_string,
	fold_negate_const, fold_abs_const, fold_not_const, round_up,
	round_down): Likewise.
	* function.c (assign_parm_setup_block): Likewise.
	* stmt.c (shift_return_value, expand_case, estimate_case_costs):
	Likewise.
	* stor-layout.c (layout_type, initialize_sizetypes,
	set_min_and_max_values_for_integral_type): Likewise.
	* tree-chrec.c (chrec_fold_multiply_poly_poly,
	reset_evolution_in_loop): Likewise.
	* tree-chrec.h (build_polynomial_chrec): Likewise.
	* tree-complex.c (build_replicated_const): Likewise.
	* tree-eh.c (honor_protect_cleanup_actions,
	lower_try_finally_onedest, lower_try_finally_copy,
	lower_try_finally_switch): Likewise.
	* tree-mudflap.c (mf_build_string, mx_register_decls,
	mudflap_register_call, mudflap_enqueue_constant): Likewise.
	* tree-nested.c (get_trampoline_type, get_nl_goto_field): Likewise.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	* tree-ssa-ccp.c (widen_bitfield, maybe_fold_offset_to_array_ref):
	Likewise.
	* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise.
	* tree-ssa-loop-niter.c (number_of_iterations_cond,
	loop_niter_by_eval, upper_bound_in_type, lower_bound_in_type):
	Likewise.
	* tree-ssa-loop-ivcanon.c (create_canonical_iv,
	canonicalize_loop_induction_variables): Likewise.
	* tree-vectorizer.c (vect_create_index_for_array_ref,
	vect_transform_loop_bound, vect_compute_data_ref_alignment):
	Likewise.

	* config/alpha/alpha.c (alpha_initialize_trampoline, alpha_va_start,
	alpha_gimplify_va_arg_1): Likewise.
	* config/arm/arm.c (arm_get_cookie_size): Likewise.
	* config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise.
	* config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise.
	* config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise.
	* config/mips/mips.c (mips_build_builtin_va_list, mips_va_start,
	mips_gimplify_va_arg_expr): Likewise.
	* config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise.
	* config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg,
	add_compiler_branch_island): Likewise.
	* config/s390/s390.c (s390_va_start): Likewise.
	* config/sh/sh.c (sh_va_start): Likewise.
	* config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start):
	Likewise.
	* config/xtensa/xtensa.c (xtensa_va_start,
	xtensa_gimplify_va_arg_expr): Likewise.

	* objc/objc-act.c (build_objc_string_object,
	build_objc_symtab_template, init_def_list, init_objc_symtab,
	init_module_descriptor, generate_static_references,
	build_selector_translation_table, get_proto_encoding,
	build_typed_selector_reference, build_selector_reference,
	build_next_objc_exception_stuff,
	build_method_prototype_list_template, generate_descriptor_table,
	generate_protocols, build_protocol_initializer,
	build_ivar_list_template, build_method_list_template,
	build_ivar_list_initializer, generate_ivars_list,
	generate_dispatch_table, generate_protocol_list,
	build_category_initializer, build_shared_structure_initializer,
	generate_shared_structures, handle_impent,
	generate_objc_image_info): Likewise.

2004-04-25  Paolo Bonzini  <bonzini@gnu.org>

	* cfglayout.c (duplicate_insn_chain): Remove references to
	NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT.
	* cfgloop.h (struct loop): Remove fields vtop, cont and cont_dominator.
	* cfgrtl.c (rtl_delete_block): Remove handling of NOTE_INSN_LOOP_CONT.
	* final.c (final_scan_insn): Remove references to NOTE_INSN_LOOP_VTOP
	and NOTE_INSN_LOOP_CONT.
	* insn-notes.def (NOTE_INSN_LOOP_VTOP, NOTE_INSN_LOOP_CONT): Remove.
	* jump.c (squeeze_notes): Remove references to NOTE_INSN_LOOP_VTOP
	and NOTE_INSN_LOOP_CONT.
	* loop.c (scan_loops, find_and_verify_loops, for_each_insn_in_loop,
	check_dbra_loop, loop_dump_aux): Remove references to removed notes
	and fields.
	* reorg.c (mostly_true_jump): Do not rely on NOTE_INSN_LOOP_VTOPs.
	* unroll.c (unroll_loop, copy_loop_body, loop_iterations): Remove
	references to removed notes and fields.
	(subtract_reg_term, ujump_to_loop_cont): Remove.

From-SVN: r86544
2004-08-25 09:52:54 +00:00
Nathan Sidwell 8c1d6d62a6 c-decl.c (c_init_decl_processing): Adjust build_common_tree_nodes call.
* c-decl.c (c_init_decl_processing): Adjust
	build_common_tree_nodes call.
	* expmed.c (const_mult_add_overflow_p): Use
	build_distinct_type_copy.
	* stor-layout.c (early_type_list): Remove.
	(layout_type): Don't append to early_type_list.
	(initialize_sizetypes): Add signed_p argument.
	(set_sizetype): Overwrite the stub type nodes directly.
	* tree.c (copy_node_stat): Clear a type's value cache here ...
	(build_distinct_type): ... not here.
	(build_common_tree_nodes): Add signed_sizetype argument. Adjust.
	* tree.h (initialize_sizetypes): Add signed_p argument.
	(build_common_tree_nodes): Likewise.

	* ada/utils.c (gnat_init_decl_processing): Adjust
	build_common_tree_nodes call.

	* cp/decl.c (cxx_init_decl_processing): Adjust
	build_common_tree_nodes call.

	* fortran/f95-lang.c (gfc_init_decl_processing): Adjust
	build_common_tree_nodes call.

	* java/decl.c (java_init_decl_processing): Adjust
	initialize_sizetypes call.

	* objc/objc-act.c (get_static_reference): Use
	build_variant_type_copy.
	(get_protocol_reference): Likewise.
	* objc/objc-act.h (TREE_STATIC_TEMPLATE): Use TREE_PRIVATE.

	* treelang/treetree.c (treelang_init_decl_processing): Adjust
	build_common_tree_nodes call.

From-SVN: r86493
2004-08-24 16:39:43 +00:00
Nathan Sidwell e15987c116 objc-act.c (build_protocol_initializer): Fix build_int_cst usage.
* objc/objc-act.c (build_protocol_initializer): Fix build_int_cst
	usage.
	(generate_protocol_list, handle_impent): Likewise.

From-SVN: r86129
2004-08-17 15:42:55 +00:00
Ziemowit Laski 9a4d6480b8 Makefile.in (C_PRETTY_PRINT_H): Add c-pretty-print.h.
[gcc/ChangeLog]
2004-08-15  Ziemowit Laski  <zlaski@apple.com>

       * Makefile.in (C_PRETTY_PRINT_H): Add c-pretty-print.h.
       (c-lang.o): Depend on c-objc-common.h.
       (c-objc-common.o): Depend on $(C_PRETTY_PRINT_H) and
       c-objc-common.h; remove duplicate $(C_TREE_H) dependency.
       * c-lang.c: Include c-objc-common.h.
       (LANG_HOOKS_FINISH, LANG_HOOKS_INIT_OPTIONS,
       LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
       LANG_HOOKS_MISSING_ARGUMENT, LANG_HOOKS_POST_OPTIONS,
       LANG_HOOKS_GET_ALIAS_SET, LANG_HOOKS_SAFE_FROM_P,
       LANG_HOOKS_EXPAND_EXPR, LANG_HOOKS_MARK_ADDRESSABLE,
       LANG_HOOKS_PARSE_FILE, LANG_HOOKS_TRUTHVALUE_CONVERSION,
       LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL,
       LANG_HOOKS_STATICP, LANG_HOOKS_SET_DECL_ASSEMBLER_NAME,
       LANG_HOOKS_NO_BODY_BLOCKS, LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL,
       LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_FUNCTION_ENTER_NESTED,
       LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_DUP_LANG_SPECIFIC_DECL,
       LANG_HOOKS_DECL_UNINIT, LANG_HOOKS_RTL_EXPAND_STMT,
       LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
       LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
       LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS,
       LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
       LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING,
       LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS,
       LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
       LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_TYPE_FOR_MODE,
       LANG_HOOKS_TYPE_FOR_SIZE, LANG_HOOKS_SIGNED_TYPE,
       LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE,
       LANG_HOOKS_INCOMPLETE_TYPE_ERROR, LANG_HOOKS_TYPE_PROMOTES_TO,
       LANG_HOOKS_REGISTER_BUILTIN_TYPE, LANG_HOOKS_WRITE_GLOBALS):
       Move to c-objc-common.h.
       * c-objc-common.c: Include c-objc-common.h.
       * c-objc-common.h: New file.

[gcc/objc/ChangeLog]
2004-08-15  Ziemowit Laski  <zlaski@apple.com>

       * Make-lang.in (objc/objc-lang.o): Depend on $(C_PRETTY_PRINT_H),
       $(DIAGNOSTIC_H), c-objc-common.h and gtype-objc.h, but not on toplev.h.
       (objc/objc-parse.o): Do not depend on gtype-objc.h.
       * objc-act.c: Do not include gtype-objc.h.
       (finish_file): Rename to objc_finish_file().
       * objc-act.h (finish_file): Update copyright notice; remove prototype.
       * objc-lang.c: Update copyright notice; include diagnostic.h,
       c-objc-common.h, c-pretty-print.h and gtype-objc.h; do not include
       toplev.h.
       (finish_file): New hook routine.
       (LANG_HOOKS_FINISH, LANG_HOOKS_INIT_OPTIONS,
       LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
       LANG_HOOKS_MISSING_ARGUMENT, LANG_HOOKS_POST_OPTIONS,
       LANG_HOOKS_GET_ALIAS_SET, LANG_HOOKS_SAFE_FROM_P,
       LANG_HOOKS_EXPAND_EXPR, LANG_HOOKS_MARK_ADDRESSABLE,
       LANG_HOOKS_PARSE_FILE, LANG_HOOKS_TRUTHVALUE_CONVERSION,
       LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL,
       LANG_HOOKS_STATICP, LANG_HOOKS_SET_DECL_ASSEMBLER_NAME,
       LANG_HOOKS_NO_BODY_BLOCKS, LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL,
       LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_FUNCTION_ENTER_NESTED,
       LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_DUP_LANG_SPECIFIC_DECL,
       LANG_HOOKS_DECL_UNINIT, LANG_HOOKS_RTL_EXPAND_STMT,
       LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
       LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
       LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS,
       LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
       LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING,
       LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS,
       LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
       LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_TYPE_FOR_MODE,
       LANG_HOOKS_TYPE_FOR_SIZE, LANG_HOOKS_SIGNED_TYPE,
       LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE,
       LANG_HOOKS_INCOMPLETE_TYPE_ERROR, LANG_HOOKS_TYPE_PROMOTES_TO,
       LANG_HOOKS_REGISTER_BUILTIN_TYPE, LANG_HOOKS_WRITE_GLOBALS):
       Move to c-objc-common.h.

From-SVN: r86037
2004-08-15 21:47:32 +00:00
Nathan Sidwell 4a90aeeb51 tree.h (build_int_cst): New.
.:	* tree.h (build_int_cst): New.
	(build_int_2): Remove.
	* tree.c (build_int_2): Remove.
	(build_int_cst): New.
	(make_vector_type, build_common_tree_nodes,
	build_common_tree_nodes_2): Use build_int_cst.
	* builtins.c (expand_builtin_prefetch, expand_builtin_strstr,
	expand_builtin_strpbrk, expand_builtin_fputs,
	build_string_literal, expand_builtin_printf,
	expand_builtin_sprintf, fold_builtin_lround, fold_builtin_bitop,
	fold_builtin_bitop, fold_builtin_isascii, fold_builtin_toascii,
	fold_builtin_isdigit, simplify_builtin_strstr,
	simplify_builtin_strpbrk, fold_builtin_fputs,
	simplify_builtin_sprintf): Use build_int_cst.
	* c-common.c (start_fname_decls, fix_string_type,
	c_common_nodes_and_builtins, c_init_attributes,
	shorten_compare): Likewise.
	* c-decl.c (complete_array_type,
	check_bitfield_type_and_width): Likewise.
	* c-lex.c (interpret_integer, lex_charconst): Likewise.
	* c-parse.in (primary): <TYPES_COMPATIBLE_P> Likewise.
	* c-pretty-print.c (pp_c_integer_constant): Likewise.
	* c-typeck.c (really_start_incremental_init, push_init_level,
	set_nonincremental_init_from_string): Likewise.
	* calls.c (load_register_parameters): Likewise.
	* convert.c (convert_to_pointer): Likewise.
	* coverage.c (coverage_counter_alloc, tree_coverage_counter_ref,
	build_fn_info_type, build_ctr_info_value, build_gcov_info):
	Likewise.
	* except.c (init_eh, assign_filter_values, assign_filter_values):
	Likewise.
	* expmed.c (store_fixed_bit_field, extract_bit_field,
	extract_fixed_bit_field, extract_split_bit_field, expand_shift,
	expand_mult_const, expand_mult_highpart_adjust, extract_high_half,
	expand_sdiv_pow2, expand_divmod, make_tree): Likewise.
	* expr.c (convert_move, emit_group_load, emit_group_store,
	expand_assignment, store_constructor, store_field,
	expand_expr_real_1, reduce_to_bit_field_precision): Likewise.
	* fold-const.c (force_fit_type, int_const_binop, fold_convert_const,
	invert_truthvalue, optimize_bit_field_compare,
	decode_field_reference, all_ones_mask_p, constant_boolean_node,
	fold_div_compare, fold, fold_read_from_constant_string,
	fold_negate_const, fold_abs_const, fold_not_const): Likewise.
	* function.c (assign_parm_setup_block): Likewise.
	* stmt.c (shift_return_value, expand_end_case_type,
	estimate_case_costs): Likewise.
	* stor-layout.c (layout_type, initialize_sizetypes,
	set_min_and_max_values_for_integral_type): Likewise.
	* tree-chrec.c (chrec_fold_multiply_poly_poly,
	reset_evolution_in_loop): Likewise.
	* tree-chrec.h (build_polynomial_chrec): Likewise.
	* tree-complex.c (build_replicated_const): Likewise.
	* tree-eh.c (honor_protect_cleanup_actions,
	lower_try_finally_onedest, lower_try_finally_copy,
	lower_try_finally_switch): Likewise.
	* tree-mudflap.c (mf_build_string, mx_register_decls,
	mudflap_register_call, mudflap_enqueue_constant): Likewise.
	* tree-nested.c (get_trampoline_type, get_nl_goto_field): Likewise.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	* tree-ssa-ccp.c (widen_bitfield, maybe_fold_offset_to_array_ref):
	Likewise.
	* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise.
	* tree-ssa-loop-niter.c (number_of_iterations_cond,
	loop_niter_by_eval, upper_bound_in_type, lower_bound_in_type):
	Likewise.

	* config/alpha/alpha.c (alpha_initialize_trampoline,
	alpha_va_start, alpha_gimplify_va_arg_1): Use build_int_cst.
	* config/arm/arm.c (arm_get_cookie_size): Likewise.
	* config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise.
	* config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise.
	* config/i860/i860.c (i860_va_start): Likewise.
	* config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise.
	* config/mips/mips.c (mips_build_builtin_va_list, mips_va_start,
	mips_gimplify_va_arg_expr): Likewise.
	* config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise.
	* config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg,
	add_compiler_branch_island): Likewise.
	* config/s390/s390.c (s390_va_start): Likewise.
	* config/sh/sh.c (sh_va_start): Likewise.
	* config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start):
	Likewise.
	* config/xtensa/xtensa.c (xtensa_va_start,
	xtensa_gimplify_va_arg_expr): Likewise.

	* objc/objc-act.c (build_objc_string_object,
	build_objc_symtab_template, init_def_list, init_objc_symtab,
	init_module_descriptor, generate_static_references,
	build_selector_translation_table, get_proto_encoding,
	build_typed_selector_reference, build_selector_reference,
	build_next_objc_exception_stuff,
	build_method_prototype_list_template, generate_descriptor_table,
	generate_protocols, build_protocol_initializer,
	build_ivar_list_template, build_method_list_template,
	build_ivar_list_initializer, generate_ivars_list,
	generate_dispatch_table, generate_protocol_list,
	build_category_initializer, build_shared_structure_initializer,
	generate_shared_structures, handle_impent,
	generate_objc_image_info): Use build_int_cst.
ada:
	* cuintp.c (UI_To_gnu): Use build_int_cst..
	* trans.c (Exception_Handler_to_gnu_sjlj, gnat_to_gnu): Likewise.
	* utils.c (init_gigi_decls): Likewise.
	* utils2.c (build_call_raise): Likewise.
cp:
	* call.c (convert_class_to_reference,
	build_user_type_conversion_1, convert_like_real,
	build_java_interface_fn_ref, build_special_member_call): Use
	build_int_cst.
	* class.c (build_vtbl_initializer): Likewise.
	* cp-gimplify.c (cp_gimplify_expr): Likewise.
	* cvt.c (cp_convert_to_pointer): Likewise.
	* decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
	* decl2.c (start_static_initialization_or_destruction,
	generate_ctor_or_dtor_function): Likewise.
	* except.c (build_throw): Likewise.
	* lex.c (cxx_init): Likewise.
	* mangle.c (write_integer_cst): Likewise.
	* rtti.c (build_headof, get_tinfo_decl_dynamic,
	build_dynamic_cast_1, ptr_initializer, ptm_initializer,
	get_pseudo_ti_init): Likewise.
	* search.c (get_dynamic_cast_base_type): Likewise.
	* tree.c (build_shared_int_cst): Likewise.
fortran:
	* trans-array.c (gfc_trans_array_constructor_value): Use
	build_int_cst.
	* trans-const.c (gfc_build_string_const,
	gfc_init_constants, gfc_conv_mpz_to_tree,
	gfc_conv_constant_to_tree): Likewise.
	* trans-decl.c (gfc_get_symbol_decl): Likewise.
	* trans-intrinsic.c (gfc_conv_intrinsic_ibits,
	gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
	* trans-io.c (add_case, set_error_locus, build_dt,
	transfer_expr): Likewise.
	* trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
	gfc_trans_stop, gfc_trans_character_select): Likewise.
	* trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
	* trans.c (gfc_trans_runtime_check): Likewise.
java:
	* boehm.c (get_boehm_type_descriptor): Use build_int_cst.
	* class.c (build_utf8_ref, build_static_field_ref,
	make_field_value, make_method_value, get_dispatch_table,
	make_class_data, emit_symbol_table, emit_catch_table): Likewise.
	* constants.c (get_tag_node,  build_ref_from_constant_pool,
	build_constants_constructor): Likewise.
	* decl.c (java_init_decl_processing): Likewise.
	* expr.c (build_java_array_length_access, build_newarray,
	expand_java_multianewarray, expand_java_pushc, expand_iinc,
	build_java_binop, build_field_ref, expand_java_add_case,
	expand_java_call, build_known_method_ref, build_invokevirtual,
	build_invokeinterface, build_jni_stub): Likewise.
	* java-gimplify.c (java_gimplify_new_array_init): Likewise.
	* jcf-parse.c (get_constant): Likewise.
	* lex.c (do_java_lex): Likewise.
	* parse.y (patch_binop, patch_unaryop, patch_cast,
	build_null_of_type, patch_newarray): Likewise.
	* resource.c (compile_resource_data): Likewise.
	* typeck.c (build_prim_array_type): Likewise.

From-SVN: r86022
2004-08-15 15:45:33 +00:00
Andrew Pinski 21149a790b objc-act.c (build_objc_string_object): Mark the address expression as constant.
2004-08-05  Andrew Pinski  <apinski@apple.com>

        * objc/objc-act.c (build_objc_string_object): Mark the address
        expression as constant.

From-SVN: r85609
2004-08-05 11:06:23 -07:00
Geoffrey Keating 0e6df31e19 re PR c/14516 (-fleading-underscore does not work correctly for file static variables)
2004-08-04  Geoffrey Keating  <geoffk@apple.com>

	PR 14516
	* c-common.c (c_expand_decl): Don't special-case static VAR_DECLs.
	* c-common.h (make_rtl_for_local_static): Delete.
	* c-decl.c (shadow_tag_warned): Clean up comment.
	(finish_decl): Clean up spacing.  Use set_user_assembler_name when
	appropriate.  Don't pass asmspec to rest_of_decl_compilation.
	* c-semantics.c (make_rtl_for_local_static): Delete.
	* expr.c (init_block_move_fn): Use set_user_assembler_name.
	(init_block_clear_fn): Likewise.
	* passes.c (rest_of_decl_compilation): Remove asmspec parameter,
	expect it to be in DECL_ASSEMBLER_NAME.  Update callers in many files.
	* toplev.h (rest_of_decl_compilation): Remove asmspec parameter.
	* tree.h (make_decl_rtl): Remove second parameter.
	(set_user_assembler_name): New.
	* varasm.c (set_user_assembler_name): New.
	(make_decl_rtl): Remove second parameter.  Update callers in many
	files.

Index: cp/ChangeLog
2004-08-04  Geoffrey Keating  <geoffk@apple.com>

	* decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
	than passing it as a parameter to rest_of_decl_compilation.
	* decl2.c (grokfield): Use set_user_assembler_name.

From-SVN: r85593
2004-08-05 05:52:01 +00:00
Eric Christopher 9f63daea37 c-common.c (c_common_unsafe_for_reeval): Delete.
2004-07-28  Eric Christopher  <echristo@redhat.com>

	* c-common.c (c_common_unsafe_for_reeval): Delete.
	* c-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete use.
	* c-pretty-print.c (pp_c_expression): Delete UNSAVE_EXPR case.
	* calls.c (fix_unsafe_tree): Delete.
	(expand_call): Delete code which used above.
	* dojump.c (do_jump): Delete UNSAVE_EXPR case.
	* expr.c (expand_expr_real_1): Ditto.
	* fold-const.c (non_lvalue): Ditto.
	* langhooks-def.h (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
	(lhd_unsafe_for_reeval): Ditto.
	* langhooks.c (lhd_unsafe_for_reeval): Ditto.
	* langhooks.h (unsafe_for_reeval): Ditto.
	(unsave_expr_now): Adjust comment.
	* tree-inline.c (copy_body_r): Delete UNSAVE_EXPR bits.
	(estimate_num_insns_1): Ditto.
	* tree-pretty-print.c (dump_generic_node): Ditto.
	* tree.c (expr_align): Ditto.
	(unsave_expr): Delete.
	(unsafe_for_reeval): Ditto.
	* tree.h (unsafe_for_reeval, unsave_expr): Ditto.
	* tree.def (UNSAVE_EXPR): Delete.
	* objc/objc-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.

2004-07-28  Eric Christopher  <echristo@redhat.com>

	* cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.

2004-07-28  Eric Christopher  <echristo@redhat.com>

	* lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
	(java_unsafe_for_reeval): Ditto.

From-SVN: r85276
2004-07-28 23:44:56 +00:00
Joseph Myers 487a92fed2 c-tree.h (struct c_expr): Define.
* c-tree.h (struct c_expr): Define.
	(C_SET_EXP_ORIGINAL_CODE): Remove.
	(parser_build_binary_op, build_compound_expr): Update prototypes.
	* c-parse.in (%union): Add exprtype.
	(FUNC_NAME): Mark as ttype.
	(expr, expr_no_commas, cast_expr, unary_expr, primary): Change to
	exprtype.
	(expr): Update.  Define directly in terms of expr_no_commas
	instead of using nonnull_exprlist.
	(nonnull_exprlist, unary_expr, cast_expr, expr_no_commas, primary,
	offsetof_member_designator, typespec_nonreserved_nonattr, init,
	initval, designator, component_declarator,
	component_notype_declarator, enumerator, array_declarator,
	condition, exexpr, switch_statement, stmt_nocomp, stmt,
	nonnull_asm_operands, ivar_declarator, receiver): Update.  Don't
	set C_EXP_ORIGINAL_CODE.  Use TREE_NO_WARNING for assignments
	where appropriate.
	* c-common.h (C_EXP_ORIGINAL_CODE): Remove.
	* c-common.c (c_common_truthvalue_conversion): Don't check
	C_EXP_ORIGINAL_CODE.
	* c-typeck.c (parser_build_binary_op): Use c_expr structures.
	Don't use C_EXP_ORIGINAL_CODE.
	(default_conversion, default_function_array_conversion): Don't use
	C_EXP_ORIGINAL_CODE.  Preserve TREE_NO_WARNING.
	(internal_build_compound_expr): Merge into build_compound_expr.
	(build_compound_expr): Take two operands instead of a TREE_LIST.
	* objc/objc-act.c (get_super_receiver): Update calls to
	build_compound_expr.

cp:
	* typeck.c (build_modify_expr, build_x_modify_expr): Set
	TREE_NO_WARNING on assignments with an operator other than '='.

testsuite:
	* g++.dg/warn/Wparentheses-1.C, g++.dg/warn/Wparentheses-2.C,
	gcc.dg/Wparentheses-10.c: New tests.
	* gcc.dg/Wparentheses-5.c: Remove XFAILs.

From-SVN: r84911
2004-07-19 09:38:52 +01:00
Joseph Myers 9dcf6e7366 langhooks.h (estimate_num_insns, [...]): Remove hooks.
* langhooks.h (estimate_num_insns, pushlevel, poplevel, set_block,
	maybe_build_cleanup, update_decl_after_saving): Remove hooks.
	* langhooks.c (lhd_clear_binding_stack): Remove.
	* langhooks-def.h (lhd_clear_binding_stack,
	LANG_HOOKS_MAYBE_BUILD_CLEANUP,
	LANG_HOOKS_UPDATE_DECL_AFTER_SAVING,
	LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS, LANG_HOOKS_PUSHLEVEL,
	LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK): Remove.
	(LANG_HOOKS_CLEAR_BINDING_STACK): Define to lhd_do_nothing.
	* system.h (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS,
	LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_SET_BLOCK,
	LANG_HOOKS_MAYBE_BUILD_CLEANUP,
	LANG_HOOKS_UPDATE_DECL_AFTER_SAVING, LANG_HOOKS_POPLEVEL): Poison.
	* tree.h (poplevel): Don't declare.
	* c-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL,
	LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK): Remove.
	* objc/objc-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK,
	LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK):
	Remove.

ada:
	* misc.c (LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL,
	LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK): Remove.

cp:
	* cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
	LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
	* cp-tree.h (poplevel): Declare.
	(set_block): Remove.
	* decl.c (set_block): Remove.

fortran:
	* f95-lang.c (set_block): Remove.
	(gfc_clear_binding_stack): New.
	(LANG_HOOKS_CLEAR_BINDING_STACK): Define.
	(struct binding_level): Remove block_created_by_back_end.
	(clear_binding_level): Likewise.
	(poplevel): Don't handle block_created_by_back_end.

java:
	* java-tree.h (set_block): Remove.
	* lang.c (java_clear_binding_stack): New.
	(LANG_HOOKS_CLEAR_BINDING_STACK): Define.
	* decl.c (struct binding_level): Remove this_block.
	(clear_binding_level): Likewise.
	(poplevel): Don't handle this_block.
	(set_block): Remove.

treelang:
	* treetree.c (set_block): Remove.
	(struct binding_level): Remove block_created_by_back_end.
	(clear_binding_level): Likewise.
	(tree_code_create_function_initial,
	tree_code_create_function_wrapup): Call pushlevel and poplevel
	directly rather than through hooks.
	(poplevel): Don't handle block_created_by_back_end.

From-SVN: r84499
2004-07-11 10:53:06 +01:00
Andrew Pinski 3d0d0a7abc objc-act.c (build_module_descriptor): Mark UOBJC_MODULES_decl as always referenced.
2004-07-09  Andrew Pinski  <apinski@apple.com>

        * objc/objc-act.c (build_module_descriptor): Mark UOBJC_MODULES_decl as
        always referenced.
        (synth_forward_declarations): Likewise for UOBJC_CLASS_decl and
        UOBJC_METACLASS_decl.

From-SVN: r84419
2004-07-09 16:32:38 -07:00
Zack Weinberg 36c1b0def4 c-decl.c (static_ctors, [...]): Make static.
* c-decl.c (static_ctors, static_dtors): Make static.
	(pop_file_scope): Call c_common_write_pch and
	cgraph_finalize_compilation_unit here.
	(build_cdtor): Moved here from c-objc-common.c; simplify.
	(c_write_global_declarations_1): Clarify comment.
	(c_write_global_declarations): Close the external scope before
	doing anything else.  Call build_cdtor, cgraph_optimize, and
	mudflap_finish_file here.
	* c-lang.c (finish_file): Don't call c_objc_common_finish_file.
	Clarify comment.
	* c-objc-common.c: No need to include cgraph.h.
	(build_cdtor): Moved to c-decl.c.
	(c_objc_common_finish_file): Delete.
	* c-tree.h: Update to match.
	* objc/objc-act.c (finish_file): Don't call c_objc_common_finish_file.
	(generate_static_references): Set TREE_USED before calling finish_decl.
	Eliminate unnecessary dummy declaration.  Call rest_of_decl_compilation
	on the static_instances_decl.

From-SVN: r84307
2004-07-08 19:50:17 +00:00
Joseph Myers bc15d0efe4 re PR c/2511 (-pedantic not warning about bitfield overflow)
2004-07-08  Joseph S. Myers  <jsm@polyomino.org.uk>
            Neil Booth  <neil@daikokuya.co.uk>

	PR c/2511
	PR c/3325
	* c-decl.c (finish_struct): Ensure bit-fields are given the
	correct type.
	* c-common.c (c_common_signed_or_unsigned_type): For C, require
	the precision to match as well as the mode.
	* expr.c (reduce_to_bit_field_precision): New function.
	(expand_expr_real_1): Reduce expressions of bit-field type to
	proper precision.
	* langhooks.h (reduce_bit_field_operations): New hook.
	* langhooks-def.h (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS):
	Define.
	* c-lang.c, objc/objc-lang.c
	(LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define.
	* objc/objc-act.c (check_ivars): Convert types to bit-field types
	before checking.
	* tree.c (build_nonstandard_integer_type): New function.
	* tree.h (build_nonstandard_integer_type): New prototype.
	* tree-ssa.c (tree_ssa_useless_type_conversion_1): Don't treat
	conversions between integer and boolean types as useless.

testsuite:
	* gcc.c-torture/execute/bitfld-1.x: Remove.
	* gcc.c-torture/execute/bitfld-3.c: New test.
	* gcc.dg/bitfld-2.c: Remove XFAILs.

Co-Authored-By: Neil Booth <neil@daikokuya.co.uk>

From-SVN: r84279
2004-07-08 09:45:05 +01:00
Zack Weinberg 6de6668085 langhooks.c: Don't include gt-langhooks.h.
* langhooks.c: Don't include gt-langhooks.h.
	(var_labelno): Delete.
	(lhd_set_decl_assembler_name): Do not append a distinguishing
	number to file-scope internal-linkage declarations for the first
	input file, even if they have DECL_CONTEXT set.  Use DECL_UID of
	the declaration itself (if at block scope), or its containing
	TRANSLATION_UNIT_DECL (if at file scope) for the distinguishing
	number.

	* opts.c (cur_in_fname): New global.
	* opts.h: Declare it.
	* tree.c: Include opts.h.
	(make_node_stat): If creating a TRANSLATION_UNIT_DECL, give it
	DECL_UID equal to cur_in_fname.
	(copy_node_stat): Do not change DECL_UID when copying a
	TRANSLATION_UNIT_DECL.
	(build_common_tree_nodes): Adjust next_decl_uid to reserve the
	range 0 .. num_in_fnames-1 for TRANSLATION_UNIT_DECLs.

	* c-decl.c (c_static_assembler_name): Delete.
	* c-tree.h (c_static_assembler_name): Delete prototype.
	* c-lang.c, objc/objc-lang.c: Don't override
	LANG_HOOKS_SET_DECL_ASSEMBLER_NAME.

	* Makefile.in (tree.o): Update dependencies.
	(GTFILES): Remove langhooks.c.

cp:
	* decl.c (cxx_init_decl_processing): Call
	build_common_tree_nodes before creating the global NAMESPACE_DECL.

From-SVN: r84123
2004-07-05 17:28:37 +00:00
Nathan Sidwell 95b4aca6a3 c-tree.h (TYPE_ACTUAL_ARG_TYPES): Use TYPE_LANG_SLOT_1.
* c-tree.h (TYPE_ACTUAL_ARG_TYPES): Use TYPE_LANG_SLOT_1.
	* dwarf2out.c (add_data_member_location_attribute): Check for
	TREE_BINFO.
	* tree.c (tree_node_kinds): Add "binfos".
	(binfo_lang_slots): New.
	(make_node_stat): Add TREE_BINFO.
	(make_tree_binfo_stat): New.
	(tree_node_structure): Add TREE_BINFO.
	* tree.def (TREE_BINFO): New.
	* tree.h (REC_OR_UNION_CHECK): Rename to ...
	(RECORD_OR_UNION_CHECK): ... here.
	(NOT_RECORD_OR_UNION_CHECK): New.
	(TRE_VIA_VIRTUAL): Allow TREE_LIST or TREE_BINFO.
	(TYPE_FIELDS, TYPE_METHODS, TYPE_VFIELD): Adjust for
	RECORD_OR_UNION_CHECK.
	(TYPE_BINFO): Use RECORD_OR_UNION_CHECK.
	(TYPE_LANG_SLOT_1): New.
	(BINFO_TYPE, BINFO_OFFSET, BINFO_VTABLE, BINFO_VIRTUALS,
	BINFO_BASETYPES, TYPE_BINFO_BASETYPES, BINFO_VPTR_FIELD,
	BINFO_BASEACCESSES, BINFO_INHERITANCE_CHAIN): Adjust.
	(BINFO_ELTS): Remove.
	(BINFO_LANG_SLOT): New.
	(struct tree_binfo): New.
	(binfo_lang_slots): Declare.
	(enum tree_node_structure_enum): Add TS_BINFO.
	(union tree_node): Add binfo.
	(make_tree_binfo_stat): Declare.
	(make_tree_binfo): New.
	(enum tree_node_kind): Add binfo_kind.

	* cp/call.c (enforce_access): Expect TREE_BINFO.
	* cp/class.c (binfo_ctor_vtable): Check TREE_BINFO.
	* cp/cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
	(BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
	Adjust.
	(BINFO_LANG_ELTS): Remove.
	(BINFO_LANG_SLOTS): New.
	(TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
	(CLASSTYPE_TEMPLATE_INFO): Adjust.
	* cp/pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
	* cp/search.c (lookup_member): Check TREE_BINFO.
	* cp/semantics.c (perform_or_defer_access_check): Likewise.
	(check_accessibility_of_qualified_id): Check
	deferred_access_no_check.
	* cp/tree.c (make_binfo): Use make_tree_binfo.

	* java/class.c (make_class): Use make_tree_binfo.
	(set_super_info, add_interface_do): Likewise.
	* java/java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.

	* objc/objc-act.c (start_class, objc_declare_protocols,
	start_protocols): Use TYPE_LANG_SLOT_1.
	* objc/objc-act.h (CLASS_BINFO_ELTS, PROTOCOL_BINFO_ELTS): Rename
	to ...
	(CLASS_LANG_SLOT_ELTS, PROTOCOL_LANG_SLOT_ELTS): ... here.
	(CLASS_IVARS, CLASS_RAW_IVARS, CLASS_STATIC_TEMPLATE,
	CLASS_CATEGORY_LIST, CLASS_PROTOCOL_LIST, CLASS_OWN_IVARS,
	PROTOCOL_LIST, PROTOCOL_FORWARD_DECL): Use TYPE_LANG_SLOT_1.

From-SVN: r84110
2004-07-05 09:35:44 +00:00
Joseph Myers ede1a38729 re PR c/1027 (slightly misleading printf format warning)
PR c/1027
	* c-lang.c (c_initialize_diagnostics): Move from here ...
	* c-objc-common.c: ... to here.  Include "c-pretty-print.h".
	(c_tree_printer): Use pretty-printer to format %T.
	* c-pretty-print.c (pp_c_specifier_qualifier_list): Include space
	before '*' if not C++.
	(pp_c_direct_abstract_declarator): Don't try to print array upper
	bound for flexible array members.
	* c-tree.h: Include "diagnostic.h".
	(c_initialize_diagnostics): Declare.
	* objc/objc-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Define.
	* c-format.c (format_type_warning): New function.  Improve
	diagnostics for incorrect format argument types.
	(check_format_types): Use it.  Add two parameters.  Use the
	TYPE_MAIN_VARIANT of wanted_type.
	(check_format_info_main): Pass new parameters to
	check_format_types.
	(struct format_wanted_type): Update comment.

testsuite:
	* gcc.dg/Wswitch-enum.c, gcc.dg/Wswitch.c,
	gcc.dg/format/branch-1.c, gcc.dg/format/diag-1.c,
	gcc.dg/format/multattr-3.c, gcc.dg/format/xopen-1.c: Update
	expected warning text.
	* gcc.dg/format/diag-2.c: New test.

From-SVN: r83965
2004-07-01 09:52:33 +01:00
Richard Kenner 350fae6628 c-common.c (c_safe_from_p, [...]): Deleted.
2004-06-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

        * c-common.c (c_safe_from_p, c_walk_subtrees): Deleted.
        * c-common.def (DECL_STMT): Remove.
        * c-common.h (DECL_STMT_DECL): Deleted.
        (COMPOUNT_LITERAL_EXPR_DECL): Use DECL_EXPR_DECL.
        (c_safe_from_p, c_walk_subtrees): Deleted.
        * c-decl.c, c-parse.in, c-pretty-print.c: DECL_STMT now DECL_EXPR.
        * c-dump.c (c_dump_tree, case DECL_STMT): Deleted.
        * c-gimplify.c (gimplify_decl_stmt): Deleted.
        (gimplify_compound_literal_expr): Use DECL_EXPR_DECL
        and gimplify_and_add.
        (c_gimplify_expr, case DECL_EXPR): New case.
        (c_gimplify_expr, case DECL_STMT): Deleted.
        * c-lang.c (LANG_HOOKS_SAFE_FROM_P): Likewise.
        (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Likewise.
        * expr.c (safe_from_p, case 's'): New case.
        * gimplify.c (gimplify_decl_expr): New function.
        (gimplify_expr, case DECL_EXPR): New case.
        * tree-inline.c (walk_tree): Walk into all fields of a type and
        decl only if they are in a DECL_EXPR.
        (mark_local_for_remap_r): Minor code cleanup.
        * tree-outof-ssa.c (discover_nonconstant_array_refs_r): Add else.
        * tree.c (has_cleanups, case DECL_EXPR): New case.
        * tree.def (DECL_EXPR): New code.
        * tree.h (DECL_EXPR_DECL): New macro.

        * objc/objc-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.

From-SVN: r83721
2004-06-26 17:11:23 -04:00
Richard Henderson 506e271035 c-decl.c (c_in_iteration_stmt, [...]): Remove.
* c-decl.c (c_in_iteration_stmt, c_in_case_stmt): Remove.
	(c_break_label, c_cont_label): New.
	(start_function): Update initializations.
	(c_push_function_context): Update saves.
	(c_pop_function_context): Update restores.
	* c-parse.in: Update expected conflicts.
	(stmt_count, compstmt_count): Remove.  Remove all updates.
	(if_prefix, simple_if, do_stmt_start): Remove.
	(lineno_labeled_stmt): Remove.
	(lineno_labels): New.
	(c99_block_lineno_labeled_stmt): Use it.
	(lineno_stmt, lineno_label): Don't clear EXPR_LOCUS before calling
	annotate_with_locus.
	(select_or_iter_stmt): Replace by ...
	(condition, if_statement_1, if_statement_2, if_statement,
	start_break, start_continue, while_statement, do_statement,
	for_cond_expr, for_incr_expr, for_statement, switch_statement): New.
	(stmt): Split out ...
	(stmt_nocomp): ... this.  Use c_finish_bc_stmt, c_finish_goto_label,
	c_finish_goto_ptr.
	* c-semantics.c (add_stmt): Don't add line numbers to labels.
	* c-tree.h: Update prototypes.
	(struct language_function): Remove x_in_iteration_stmt, x_in_case_stmt;
	add x_break_label, x_cont_label, x_switch_stack.
	(c_switch_stack): Declare.
	* c-typeck.c (c_finish_goto_label, c_finish_goto_ptr): New.
	(c_finish_return): Return the statement.
	(c_switch_stack): Rename from switch_stack; export.
	(if_elt, if_stack, if_stack_space, if_stack_pointer): Remove.
	(c_begin_if_stmt, c_finish_if_cond, c_finish_then, c_begin_else,
	c_finish_else): Remove.
	(c_finish_if_stmt): Rewrite to perform the entire operation.
	(c_begin_while_stmt, c_finish_while_stmt_cond, c_finish_while_stmt,
	c_begin_for_stmt, c_finish_for_stmt_init, c_finish_for_stmt_cond,
	c_finish_for_stmt_incr, c_finish_for_stmt): Remove.
	(c_finish_loop): New.
	(c_finish_bc_stmt): New.
	(c_finish_expr_stmt): Return the statement.  Split out...
	(c_process_expr_stmt): ... this.  Don't add locus to error marks.
	* gimplify.c (gimplify_cond_expr): Accept NULL type statements.
	* tree-gimple.c (is_gimple_stmt): Likewise.
	* tree-pretty-print.c (dump_generic_node <COND_EXPR>): Likewise.
	(print_struct_decl): Delete empty compound statement.
	* objc/objc-act.c (objc_build_throw_stmt): Return the statement.
	* objc/objc-act.h: Update decl.

From-SVN: r83620
2004-06-24 16:12:30 -07:00
Andrew Pinski c63817711e objc-act.c (build_objc_method_call): Save the lookup_object so we do not call it twice.
2004-06-24  Andrew Pinski  <apinski@apple.com>

        * objc-act.c (build_objc_method_call): Save the lookup_object
        so we do not call it twice.

From-SVN: r83618
2004-06-24 15:52:42 -07:00
Richard Henderson 0f59171d71 tree.def (VTABLE_REF): Remove.
* tree.def (VTABLE_REF): Remove.
        (OBJ_TYPE_REF): New.
        (TRY_CATCH_EXPR, TRY_FINALLY_EXPR): Set type 's'.
        * expr.c (expand_expr_real_1): Replace VTABLE_REF with OBJ_TYPE_REF.
        * fold-const.c (non_lvalue): Likewise.
        * gimplify.c (gimplify_expr): Likewise.
        (gimplify_call_expr): Use is_gimple_call_addr.
        * langhooks-def.h (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
        * langhooks.h (fold_obj_type_ref): New.
        * tree-gimple.c (is_gimple_call_addr): New.
        * tree-gimple.h (is_gimple_call_addr): Declare.
        * tree-inline.c (inlinable_function_p): Fix merge error.
        (estimate_num_insns_1): Replace VTABLE_REF with OBJ_TYPE_REF.
        * tree-pretty-print.c (dump_generic_node): Likewise.
        (print_call_name): Handle OBJ_TYPE_REF.
        * tree-ssa-ccp.c (fold_stmt): Fold OBJ_TYPE_REF.
        * tree-ssa-operands.c (get_expr_operands): Handle OBJ_TYPE_REF.
        * tree.h (OBJ_TYPE_REF_EXPR): New.
        (OBJ_TYPE_REF_OBJECT, OBJ_TYPE_REF_TOKEN): New.
        * doc/c-tree.texi (VTABLE_REF): Remove.
        * objc/objc-act.c (build_objc_method_call): Build an OBJ_TYPE_REF.
cp/
        * class.c (build_vfn_ref): Take a pointer not object.  Build
        an OBJ_TYPE_REF.
        (cp_fold_obj_type_ref): New.
        * call.c (build_over_call): Update build_vfn_ref call.
        * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
        * cp-tree.h (cp_fold_obj_type_ref): Declare.
testsuite/
        * g++.dg/opt/devirt1.C: New.

From-SVN: r83531
2004-06-22 17:26:04 -07:00
Richard Kenner 44de5aeb00 alias.c (adjust_offset_for_component_ref): Use component_ref_field_offset.
* alias.c (adjust_offset_for_component_ref): Use
	component_ref_field_offset.
	* c-decl.c (build_array_declarator): Add news args for ARRAY_REF.
	* c-gimplify.c (gimplify_expr_stmt): Use alloc_stmt_list.
	(gimplify_decl_stmt): Call gimplify_type_sizes for type.
	For decl, call gimplify_one_sizepos and use statement list.
	(gimplify_compound_literal_expr): New arg PRE_P.
	Add statement to PRE_P list and return DECL.
	(c_gimplify_expr, case COMPOUND_LITERAL_EXPR): Add arg to
	gimplify_compound_literal_expr.
	* c-tree.h (getdecls): Deleted.
	* c-typeck.c (build_component_ref): Add operand for COMPONENT_REF.
	(build_array_ref): Add two operands for ARRAY_REF.
	(build_unary_op): Set TREE_INVARIANT and TREE_CONSTANT for
	COMPOUND_LITERAL_EXPR.
	* coverage.c (tree_coverage_counter_ref): Add new operands
	for ARRAY_REF.
	* emit-rtl.c (component_ref_for_mem_expr): Add new operand
	for COMPONENT_REF.
	(set_mem_attributes_minus_bitpos): Use array_ref_low_bound
	and array_ref_element_size.
	(widen_memory_access):Use component_ref_field_offset.
	* explow.c (update_nonlocal_goto_save_area): Add two operands
	for ARRAY_REF.
	* expr.c (array_ref_element_size, array_ref_low_bound): New functions.
	(component_ref_field_offset): Likewise.
	(get_inner_reference): Use them.
	(expand_expr_real_1, case ARRAY_REF): Use array_ref_low_bound.
	* fold-const.c (fold, case EQ_EXPR): Properly handle DECL_SIZE.
	(fold_read_from_constant_string): Use array_ref_low_bound.
	Verify that result is a character type.
	(build_fold_indirect_ref): Add two operands for ARRAY_REF.
	* function.c (expand_function_start): Likewise.
	* gimple-low.c (expand_var_p): Delete duplicated line.
	* gimplify.c: Add static decls for local functions.
	(cgraph.h): Now included.
	(create_tmp_var): Remove check for ARRAY_TYPE.
	(copy_if_shared_r): Look at bounds and sizes of types.
	(build_and_jump): Return alloc_stmt_list instead of build_empty_stmt.
	(gimplify_exit_expr, shortcut_cond_expr): Likewise.
	(gimplify_save_expr, gimple_push_cleanup): Likewise.
	(gimplify_init_constructor): Likewise.
	WANT_VALUE now bool.
	If empty list with no result wanted, return GS_UNHANDLED.
	Add additional operands for ARRAY_REF and COMPONENT_REF.
	(canonicalize_component_ref): Convert to &array[L].
	(gimplify_array_ref_to_plus): Use array_ref_element_size and
	array_ref_lower_bound.
	(build_addr_expr_with_type, build_addr_expr): New functions.
	(gimplify_compound_lval): WANT_LVALUE now bool.
	Major rework to allow handle_component_p and initialize and
	gimplify new operands for ARRAY_REF, ARRAY_RANGE_REF, and
	COMPONENT_REF.
	(gimplify_array_ref): Deleted.
	(gimplify_self_mod_expr): WANT_VALUE now bool.
	(gimplify_modify_expr): Gimplify to_p and from_p later.
	Factor out code into gimplify_modify_expr_rhs and call twice.
	Move variable-size code earlier and handle PLACEHOLDER_EXPR.
	(gimplify_modify_expr_rhs, gimplify_variable_sized_compare): New fns.
	(gimplify_addr_expr, case VIEW_CONVERT_EXPR): New case.
	(gimplify_expr, case ARRAY_REF): Delete special case.
	Instead handle like COMPONENT_REF; also do ARRAY_RANGE_REF,
	IMAGPART, and REALPART the same way.
	(gimplify_expr, case VIEW_CONVERT_EXPR): New case.
	(gimplify_expr): Call gimplify_variable_sized_compare if applicable.
	Call alloc_stmt_list instead of build_empty_stmt.
	Deal with _REF that's volatile.
	(gimplify_type_sizes, gimplify_one_sizepos): New functions.
	(unshare_body, unvisit_body): New functions.
	(gimplify_body): Call them.
	* stmt.c (expand_stack_alloc): Don't expand TYPE_MAX_VALUE.
	* stor-layout.c (get_pending_sizes): Don't change SAVE_EXPR_CONTEXT.
	* tree-alias-common.c (get_alias_var): Also skip ARRAY_RANGE_REF.
	* tree-cfg.c (tree_node_can_be_shared): Treat ARRAY_RANGE_REF
	like ARRAY_REF.
	(verify_expr, case ADDR_EXPR): Use handled_component_p.
	* tree-dfa.c (get_virtual_var): Likewise.
	* tree-dump.c (dequeue_and_dump, case COMPONENT_REF, ARRAY_REF):
	New cases to dump new operands; likewise for ARRAY_RANGE_REF.
	* tree-eh.c (tree_could_trap, case ARRAY_RANGE_REF): Like ARRAY_REF.
	* tree-gimple.c (is_gimple_addr_expr_arg): Add ARRAY_RANGE_REF
	and INDIRECT_REF.
	(get_base_address): Use handled_component_p.
	* tree-gimple.h (gimplify_type_sizes, gimplify_one_sizepos): New.
	* tree-line.c (walk_tree): Walk more things for types and decls.
	* tree-mudflap.c (mf_build_check_statement_for): Add new operands
	for ARRAY_REF and COMPONENT_REF.
	(mx_xform_derefs_1): Clean up usage of decl sizes.
	* tree-nested.c (build_addr): Use handled_component_p.
	(walk_stmts, case CATCH_EXPR): Add missing "break".
	(get_static_chain, get_frame_field): Add new operand for COMPONENT_REF.
	(finalize_nesting_tree_1): Likewise.
	(convert_nonlocal_reference, case ARRAY_RANGE_REF): Like ARRAY_REF
	and process additional operands.
	(convert_local_reference): Likewise.
	* tree-outof-ssa.c (discover_nonconstant_array_refs_r): Treat
	ARRAY_RANGE_REF similarly to ARRAY_REF.
	* tree-pretty-print.c (dump_generic_node, case QUAL_UNION_TYPE): Handle
	like RECORD_TYPE.
	(dump_generic_node, case COMPONENT_REF): Print offset operand.
	(dump_generic_node, case ARRAY_RANGE_REF): Treat like ARRAY_REF
	and print lower bound and element size for both.
	(op_prio, case ARRAY_RANGE_REF): Like ARRAY_REF.
	* tree-sra.c (csc_build_component_ref): Add new operand.
	(scalarize_call_expr): Use get_base_address.
	* tree-ssa-ccp.c (widen_bitfield): Clean up size handling.
	(maybe_fold_offset_to_array_ref): Rework to handle input having an
	ARRAY_REF, refine handling of lower bound, and add new operands
	for ARRAY_REF.
	(maybe_fold_to_component_ref): Add new operand for COMPONENT_REF.
	(maybe_fold_stmt_indirect): Only fold *&B to B if types match.
	(maybe_fold_stmt_addition): Only handle constant lower bound.
	* tree-ssa-operands.c (get_expr_operands): Minor rearrangements.
	Treat ARRAY_REF and ARRAY_RANGE_REF the same; look at extra operands.
	Look at new offset operand of COMPONENT_REF.
	* tree-ssa.c (set_is_used): Use handled_component_p.
	* tree.c (substitute_in_expr, case COMPONENT_REF): Add new operand.
	(stabilize_reference, case COMPONENT_REF): Likewise.
	(stabilize_reference, case ARRAY_RANGE_REF, ARRAY_REF): Similarly.
	(recompute_tree_invariant_for_addr_expr): Completely rework to
	be more precise.  Also set TREE_SIDE_EFFECTS.
	(build1_stat, case ARRAY_EXPR): Don't handle TREE_SIDE_EFFECTS here.
	(build2_stat, build3_stat, build4_stat): For references,
	propagate TREE_THIS_VOLATILE.
	(get_unwidened): Add new operand for COMPONENT_REF.
	(get_narrower): Likewise; use host_integerp for DECL_SIZE.
	* tree.def (COMPONENT_REF): Add new operand.
	(ARRAY_REF, ARRAY_RANGE_REF): Add two new operands.
	* tree.h (array_ref_element_size, array_ref_low_bound): New decls.
	(component_ref_field_offset): Likewise.
	* config/alpha/alpha.c (alpha_va_start): Add new op for COMPONENT_REF.
	(alpha_gimplify_va_arg): Likewise.
	* config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise.
	* config/i860/i860.c (i860_va_start, i860_va_arg): Likewise.
	* config/iq2000/iq2000.c (iq2000_va_arg): Likewise.
	* config/mips/mips.c (mips_va_start, mips_va_arg): Likewise.
	* config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg):
	Likewise.
	* config/s390/s390.c (s390_va_start, s390_gimplify_va_arg): Likewise.
	* config/sh/sh.c (sh_va_start, sh_va_arg): Likewise.
	* config/stormy16/stormy16.c (xstormy1_expand_builin_va_start):
	Likewise.
	(xstormy16_expand_builtin_va_arg): Likewise.
	* config/xtensa/xtensa.c (xtensa_va_start, xtensa_va_arg): Likewise.

	* cp/call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
	(build_new_method_call): Likewise.
	* cp/decl.c (local_variable_p_walkfn): Don't walk into types.
	* cp/decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
	(build_anon_union_vars): Add new operand for COMPONENT_REF.
	* cp/init.c (buld_new): Add new operand for ARRAY_REF.
	* cp/method.c (do_build_copy_constructor): New op for COMPONENT_REF.
	(do_build_assign_ref): Likewise.
	* cp/parser.c (cp_parser_direct_new_declarator): Add new operands
	for ARRAY_REF.
	(cp_parser_direct_declarator): Likewise.
	* cp/pt.c (tsubst): Likewise.
	(tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
 	for COMPONENT_REF.
	* cp/semantics.c (finish_non_static_data_member): Add new operand
	for COMPONENT_REF.
	* cp/typeck.c (build_class_member_access_expr): Likewise.
	(build_class_member_access_expr, finish_class_member_access_expr):
	Likewise.
	(build_ptrmemfunc_access_expr): Likewise.
	(build_array_ref): Add new operands for ARRAY_REF.
	* cp/typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
	* cp/tree.c (count_trees_r, no_linkage_helper): Don't walk in types.

	* fortran/f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
	* fortran/trans-array.c (gfc_conv_descriptor_data): Add operand
	for COMPONENT_REF.
	(gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
	(gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
	(gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
	* fortran/trans-common.c (create_common): Likewise.
	* fortran/trans-expr.c (gfc_conv_component_ref): Likewise.
	* fortran/trans-io.c (set_parameter_value): Likewise.
	(set_parameter_ref, set_string, set_flag, io_result): Likewise.
	(transfer_expr): Likewise.
	* fortran/trans-decl.c (gfc_trans_auto_character_variable):
	Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
	(gfc_simplify_function): New function.
	(gfc_generate_function-code): Properly handle nested functions.
	* fortran/trans.c (gfc_build_array_ref): Add two new operands
	for ARRAY_REF.

	* java/class.c (build_class_ref): Add new operand for COMPONENT_REF.
	(build_static_field_ref): Likewise and add new operands for ARRAY_REF.
	* java/constants.c (build_ref_from_constant_pool): Likewise.
	* java/expr.c (build_java_array_length_access): Likewise.
	(build_get_class, build_field_ref, build_known_method_ref): Likewise.
	(invoke_build_dtable, build_invokevirtual): Likewise.
	(build_invokeinterface, java_expand_expr): Likewise.
	(emit_init_test_initialization): Likewise.
	* java/java-gimplify.c (java_gimplify_new_array_init): Likewise.
	* java/parse.y (make_qualifed_name, build_array_ref): Likewise.

	* objc/ojbc-act.c (generate_static_references): Add additional
	operands to ARRAY_REF.
	(generate_strings, build_method_prototype_list_template): Likewise.
	(generate_protocol_list): Likewise.

From-SVN: r83474
2004-06-21 23:07:05 -04:00
Richard Henderson 3a5b9284da c-common.c (verify_sequence_points): Export.
* c-common.c (verify_sequence_points): Export.
        (c_expand_expr_stmt): Move to c-typeck.c.
        * c-common.h (c_expand_expr_stmt): Remove.
        (verify_sequence_points): Declare.
        * c-mudflap.c (mflang_flush_calls): Use c_finish_expr_stmt.
        * c-parse.in (for_init_stmt, stmt): Likewise.
        * c-tree.h (c_finish_expr_stmt): Declare.
        (c_tree_expr_nonnegative_p): Remove.
        * c-typeck.c (c_tree_expr_nonnegative_p): Remove.
        (build_conditional_expr, build_binary_op): Use tree_expr_nonnegative_p.
        (emit_side_effect_warnings): New.
        (c_finish_expr_stmt): Rename from c_expand_expr_stmt.  Use it.
        (c_finish_stmt_expr): Work without EXPR_STMT.  Handle eh regions.
        Use emit_side_effect_warnings.
        (push_cleanup): Copy STATEMENT_LIST_STMT_EXPR.
        * fold-const.c (tree_expr_nonnegative_p): Handle TARGET_EXPR.
        * gimplify.c (gimplify_modify_expr): Don't discard TARGET_EXPR
        with void initializer.
        (gimplify_target_expr): Handle void BIND_EXPR initializer.
        * tree-inline.c (estimate_num_insns_1): Fix type lookup for
        INIT_EXPR and MODIFY_EXPR.
        * objc/objc-act.c (build_module_descriptor): Use add_stmt
        instead of c_expand_expr_stmt.
cp/
        * semantics.c (finish_expr_stmt): Call verify_sequence_points.
testsuite/
        * gcc.dg/tree-ssa/20030714-1.c: Rename variables to avoid
        merging && to BIT_FIELD_REF.

From-SVN: r83429
2004-06-21 02:15:29 -07:00
David Ayers 5c234cd7f4 objc-act.h (get_object_reference): Rename to get_protocol_reference.
2004-06-20  David Ayers  <d.ayers@inode.at>

	* objc/objc-act.h (get_object_reference): Rename to
	get_protocol_reference.
	(super_type): Rename to objc_super_type.
	(selector_type): Rename to objc_selector_type.
	(id_type): Rename to objc_id_type.
	(instance_type): Rename to objc_instance_type.
	(protocol_type): Rename to objc_protocol_type.
	(IS_ID): Update reference to id_type.
	* objc/objc-act.c (get_object_reference): Rename to
	get_protocol_reference; add documentation; update references to
	id_type.
	(lookup_method_in_protocol_list): Rename class_meth to
	is_class; add documentation.
	(finish_message_expr): Rename is_class to class_tree.
	(synth_module_prologue, objc_is_object_ptr, objc_build_exc_ptr,
	next_sjlj_build_try_catch_finally, objc_begin_catch_clause,
	build_next_objc_exception_stuff, get_arg_type_list,
	build_objc_method_call): Update references to id_type.
	(synth_module_prologue, build_objc_symtab_template,
	build_selector_reference_decl, build_selector,
	build_selector_translation_table, build_typed_selector_reference,
	get_arg_type_list, synth_self_and_ucmd_args, get_arg_type_list,
	synth_self_and_ucmd_args): Update references to selector_type.
	(build_private_template, build_ivar_reference):	Update references
	to instance_type.
	(synth_module_prologue, build_protocol_reference,
	build_protocol_expr, start_protocol): Update references to
	protocol_type.
	(synth_module_prologue, get_arg_type_list, build_objc_method_call):
	Update references to super_type.
	* c-parse.in: (typespec_nonreserved_nonattr): Update
	references to get_object_reference.
	* objc/objc-tree.def: Add C mode identifier sequence.

From-SVN: r83425
2004-06-21 01:50:18 +00:00
Richard Henderson 093c715302 c-common.c (flag_objc_sjlj_exceptions): New.
* c-common.c (flag_objc_sjlj_exceptions): New.
	* c-common.h (flag_objc_sjlj_exceptions): Declare.
	* c-opts.c (c_common_handle_option): Set it.
	(c_common_post_options): Handle interation of different
	objective-c exception and runtime switches.
	* c-decl.c (c_eh_initialized_p): New.
	(finish_decl): Use it instead of local eh_initialized_p.
	* c-parse.in (nested_function, notype_nested_function): Record
	the result of compstmt.
	(compstmt_or_error): Likewise.
	(compstmt): Don't add_stmt the result.
	(stmt): Don't return anything.  Rewrite objc try and sync rules.
	(objc_try_stmt, objc_catch_list): Remove.
	(objc_catch_block, objc_finally_block): Remove.
	(objc_catch_prefix, objc_catch_clause, objc_opt_catch_list): New.
	(objc_try_catch_clause, objc_finally_clause): New.
	(objc_try_catch_stmt): Rewrite.
	* c-tree.h (c_eh_initialized_p): Declare.
	* c-opt (fobjc-sjlj-exceptions): New.
	* except.c (output_function_exception_table): Don't call cgraph
	on non-decls.
	* objc/objc-act.c (UTAG_EXCDATA_VAR, UTAG_CAUGHTEXC_VAR,
	UTAG_RETHROWEXC_VAR, UTAG_EVALONCE_VAR, struct val_stack,
	catch_count_stack, exc_binding_stack, if_nesting_count,
	blk_nesting_count, objc_enter_block, objc_exit_block,
	objc_declare_variable, val_stack_push, val_stack_pop,
	objc_build_try_enter_fragment, objc_build_extract_expr,
	objc_build_try_exit_fragment, objc_build_extract_fragment,
	objc_build_try_prologue, objc_build_try_epilogue,
	objc_build_catch_stmt, objc_build_catch_epilogue,
	objc_build_finally_prologue, objc_build_finally_epilogue,
	objc_build_try_catch_finally_stmt, objc_build_synchronized_prologue,
	objc_build_synchronized_epilogue): Remove.
	(objc_create_temporary_var, struct objc_try_context, cur_try_context,
	objc_eh_runtime_type, objc_init_exceptions, objc_build_exc_ptr,
	next_sjlj_build_try_exit, next_sjlj_build_enter_and_setjmp,
	next_sjlj_build_exc_extract, next_sjlj_build_catch_list,
	next_sjlj_build_try_catch_finally, objc_begin_try_stmt,
	objc_begin_catch_clause, objc_finish_catch_clause,
	objc_build_finally_clause, objc_finish_try_stmt,
	objc_build_synchronized): New.
	(objc_is_object_id, objc_is_class_id): New.
	(objc_comptypes): Use them.
	(build_next_objc_exception_stuff): Break NeXT sjlj out from
	build_objc_exception_stuff.
	(synth_module_prologue): Update to match.
	(objc_build_throw_stmt): Use cur_try_context to decide if
	we're in a @catch.
	* objc/objc-act.h: Update prototypes.
	(OCTI_EXCEPTION_BLK_STACK, objc_exception_block_stack): Remove.
testsuite/
        * objc.dg/sync-1.m: New.
        * objc.dg/try-catch-1.m: Don't force next runtime.
        * objc.dg/try-catch-3.m, objc.dg/try-catch-4.m: Likewise.
        * objc.dg/try-catch-2.m: Likewise.  Enable everywhere.  Remove
        shadowed catch clause.
        * objc.dg/try-catch-5.m: New.

From-SVN: r83332
2004-06-17 18:20:53 -07:00
Richard Henderson 5882f0f31a c-common.def (COMPOUND_STMT): Remove.
* c-common.def (COMPOUND_STMT): Remove.
        * c-common.c (finish_fname_decls): Don't look through it.
        * c-typeck.c (c_tree_expr_nonnegative_p): Likewise.
        * c-common.h (COMPOUND_BODY): Remove.
        (c_common_stmt_codes): Remove COMPOUND_STMT.
        * c-dump.c (c_dump_tree): Likewise.
        * c-gimplify.c (c_gimplify_stmt): Likewise.
        * c-pretty-print.c (pp_c_statement): Likewise.
        * tree.h (DECL_SAVED_TREE): Update commentary.
        * doc/c-tree.texi (ASM_EXPR): Rename from ASM_STMT.
        (CASE_LABEL_EXPR): Rename from CASE_LABEL.
        (GOTO_EXPR): Rename from GOTO_STMT.
        (GOTO_FAKE_P): Remove.
        (COMPOUND_STMT): Remove.
        (HANDLER): Update wrt COMPOUND_STMT.
        (STMT_EXPR): Likewise.
        (LABEL_EXPR): Rename from LABEL_STMT.
        (SCOPE_STMT): Remove.
        * objc/objc-act.c (objc_build_try_catch_finally_stmt): Don't look
        through COMPOUND_STMT.
cp/
        * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
        (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
        * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
        of CTOR_INITIALIZER ...
        (pp_cxx_statement): ... here.
        * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
        (finish_function): Use alloc_stmt_list to zap entire function.
        * parser.c (cp_parser_compound_statement): Update commentary.
        * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
        * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
        (finish_stmt_expr): Don't look through COMPOUND_STMT.

From-SVN: r83281
2004-06-16 18:24:06 -07:00
Richard Henderson 9e51cf9da4 c-common.h (c_begin_if_stmt, [...]): Remove decls.
* c-common.h (c_begin_if_stmt, c_begin_while_stmt,
        c_finish_while_stmt_cond): Remove decls.
        * c-parse.in (if_prefix): Don't save c_begin_if_stmt result.
        * c-typeck.c (c_begin_if_stmt): Return void.
        (c_begin_else): Tidy.  Save stmt_count.
        * c-tree.h (c_begin_if_stmt): Update decl.
        * objc/objc-act.c (objc_build_try_enter_fragment,
        objc_build_extract_fragment, objc_build_try_epilogue,
        objc_build_catch_stmt, objc_build_catch_epilogue,
        objc_build_finally_prologue, objc_build_finally_epilogue): Update
        for if builder function changes.

From-SVN: r83280
2004-06-16 18:06:04 -07:00
Richard Henderson 325c369115 c-common.c (lang_gimplify_stmt): Remove next_p argument.
* c-common.c (lang_gimplify_stmt): Remove next_p argument.
	(if_elt, if_stack, if_stack_space, c_expand_start_cond, c_finish_then,
	c_expand_end_cond, c_expand_start_else, c_finish_else, c_begin_if_stmt,
	c_begin_while_stmt, c_finish_while_stmt_cond): Move to c-typeck.c.
	(finish_fname_decls, fname_decl): Use statement_lists.
	(c_expand_expr_stmt): Don't set last_expr_type.
	(c_type_hash): Fix indentation.
	(c_safe_from_p): Don't follow TREE_CHAIN.
	(c_tree_chain_matters_p): Remove.
	* c-common.def (SCOPE_STMT): Remove.
	(CLEANUP_STMT): Redefine to contain its own body.
	* c-common.h (struct stmt_tree_s): Remove x_last_stmt,
	x_last_expr_type, x_last_expr_filename, x_scope_stmt_stack.
	Add x_cur_stmt_list.
	(last_tree, last_expr_type, last_expr_filename, RECHAIN_STMTS): Remove.
	(cur_stmt_list): New.
	(STATEMENT_LIST_STMT_EXPR): New.
	(SCOPE_BEGIN_P, SCOPE_END_P, SCOPE_STMT_BLOCK, SCOPE_NULLIFIED_P,
	SCOPE_NO_CLEANUPS_P, SCOPE_PARTIAL_P, NEW_FOR_SCOPE_P): Remove.
	(CLEANUP_BODY): New.
	(CLEANUP_DECL): Move to operand 2.
	(c_common_stmt_codes): Remove SCOPE_STMT.
	(COMPOUND_STMT_NO_SCOPE, COMPOUND_STMT_BODY_BLOCK): Remove.
	* c-decl.c (c_scope_stmt_stack, current_scope_stmt_stack): Remove.
	(c_push_function_context, c_pop_function_context): Don't save it.
	(finish_decl): Set TREE_USED on the decl for a cleanup.
	Use push_cleanup.
	(store_parm_decls): Use statement lists.
	(finish_function): Remove compstmt rule workaround.  Use statement
	lists.  Call finish_fname_decls after finalizing the body.
	(c_begin_compound_stmt): Move to c-typeck.c.
	* c-dump.c (c_dump_tree): Remove SCOPE_STMT.
	* c-gimplify.c (gimplify_cleanup_stmt, gimplify_cleanup_stmts): New.
	(c_genericize): Invoke them.
	(c_gimplify_stmt): Don't look through TREE_CHAIN.  Kill SCOPE_STMT.
	(c_build_bind_expr): Export.
	(gimplify_block, gimplify_cleanup): Remove.
	(gimplify_condition): Use gimplify_stmt.
	(gimplify_for_stmt): Remove FOR_INIT_STMT chaining hack.
	(gimplify_if_stmt): Remove recursion hack.
	(c_gimplify_expr): Remove STMT_EXPR handling.
	(stmt_expr_last_stmt, gimplify_stmt_expr): Remove.
	(is_last_stmt_of_scope): Remove.
	* c-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
	* c-mudflap.c (mflang_flush_calls): Use c_begin_compound_stmt,
	c_end_compound_stmt.
	* c-objc-common.c (build_cdtor): Likewise.
	* c-parse.in (primary): Use c_finish_stmt_expr.
	(push_scope, pop_scope): Remove.
	(c99_block_start, compstmt_start): Use c_begin_compound_stmt.
	(c99_block_end, compstmt): Use c_end_compound_stmt.
	(c99_block_lineno_labeled_stmt): Likewise.
	(compstmt_primary_start): Use c_begin_stmt_expr.
	(simple_if, select_or_iter_stmt): Update calls to stmt builders.
	(do_stmt_start): Fill in body directly.
	(lineno_stmt): Avoid setting lineno on constants.
	* c-pretty-print.c (pp_c_statement): Handle STATEMENT_LIST.
	Remove SCOPE_STMT.
	* c-semantics.c (begin_stmt_tree): Remove.
	(push_stmt_list, re_push_stmt_list, pop_stmt_list): New.
	(add_stmt): Use statement lists.
	(add_scope_stmt, finish_stmt_tree): Remove.
	(push_cleanup): New.
	* c-tree.h: Move some decls from c-common.h.
	* c-typeck.c (c_tree_expr_nonnegative_p): Simplify for statement lists.
	(do_case, c_finish_case): Likewise.
	(c_finish_then): Take body for then as argument.
	(c_finish_else): Similarly.
	(c_begin_for_stmt, c_finish_for_stmt_init, c_finish_for_stmt_cond,
	c_finish_for_stmt_incr, c_finish_for_stmt): New.
	(c_begin_stmt_expr, c_finish_stmt_expr): New.
	(c_begin_compound_stmt): Do scope management.
	(c_end_compound_stmt): New.
	* fold-const.c (tree_expr_nonnegative_p): Fix BIND_EXPR.
	* gimplify.c (voidify_wrapper_expr): Accept temporary argument.
	Look through exception handling constructs.
	(gimplify_bind_expr): Accept temporary argument.
	(gimplify_target_expr): Special case BIND_EXPR bodies.
	(gimplify_expr): Handle fallback == fb_none like a statement.
	* langhooks-def.h (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Kill.
	* langhooks.c (lhd_tree_inlining_tree_chain_matters_p): Remove.
	* langhooks.h (tree_chain_matters_p): Remove.
	* stub-objc.c (objc_clear_super_receiver): New.
	* tree-gimple.h (voidify_wrapper_expr): Update decl.
	(append_to_statement_list, append_to_statement_list_force): Move
	to tree-iterator.h.
	* tree-inline.c (expand_call_inline): Update call.
	(clone_body): Use statement lists.
	(walk_tree): Don't check tree_chain_matters_p.
	(copy_tree_r): Likewise.
	* tree-iterator.c (alloc_stmt_list): Clear lang bits.
	(tsi_link_before, tsi_link_after): Set TREE_SIDE_EFFECTS properly.
	* tree-iterator.h (append_to_statement_list,
	append_to_statement_list_force): Moved from tree-gimple.h.
	* tree-pretty-print.c (dump_generic_node): Clean up TARGET_EXPR dump.
	* objc/objc-act.c (build_module_descriptor): Use c_begin_compound_stmt.
	(objc_enter_block): Likewise.
	(objc_exit_block): Use c_end_compound_stmt.
	(objc_build_try_enter_fragment): Add #error and comment for
	rewriting for OBJCPLUS.
	(objc_build_extract_fragment, objc_build_try_epilogue,
	objc_build_catch_stmt, objc_build_finally_prologue,
	objc_build_finally_epilogue): Update for C statement builders.
	* objc/objc-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P):
	Remove.
cp/
	* call.c (initialize_reference): Don't build CLEANUP_STMT here.
	* cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
	(genericize_try_block): Use gimplify_stmt.
	(genericize_catch_block, genericize_eh_spec_block): Likewise.
	(cp_gimplify_init_expr): Remove STMT_EXPR special case.
	(gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
	* cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
	(cp_tree_chain_matters_p): Remove.
	* cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
	(COMPOUND_STMT_BODY_BLOCK): New.
	(STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
	(EXPR_STMT_STMT_EXPR_RESULT): New.
	(building_stmt_tree): Check cur_stmt_list.
	(tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
	(BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
	* decl.c (poplevel): Use pop_stmt_list for minding cleanups.
	(cp_finish_decl): Use push_cleanup.
	(start_function, finish_function): Use statement lists.
	(finish_stmt): Do nothing.
	* except.c (begin_eh_spec_block): Use statement lists.
	(check_handlers_1, check_handlers): Likewise.
	* init.c (construct_virtual_base): Don't add extra compound stmts.
	(build_vec_init): Likewise.
	* name-lookup.c (maybe_push_cleanup_level): Use statement lists.
	* name-lookup.h (struct cp_binding_level): Add statement_list.
	* parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
	(cp_parser_labeled_statement, cp_parser_expression_statement,
	cp_parser_statement_seq_opt): Likewise.
	(cp_parser_compound_statement): Likewise.  Take bool for try block.
	(cp_parser_selection_statement): Tidy if processing.
	(cp_parser_already_scoped_statement): Rewrite to do what it says.
	* pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
	(tsubst_expr): Rewrite STMT_EXPR processing.  Handle STATEMENT_LIST.
	Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
	* semantics.c (do_poplevel, do_pushlevel): Use statement lists.
	(finish_cond): New, rewritten from FINISH_COND.
	(simplify_loop_decl_cond): New.
	(finish_expr_stmt): Avoid nested EXPR_STMTs.
	(begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
	begin_else_clause, finish_else_clause, finish_if_stmt,
	begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
	begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
	finish_for_cond, finish_for_stmt, begin_switch_stmt,
	finish_switch_cond, finish_switch_stmt, begin_try_block,
	finish_try_block, finish_cleanup_try_block, finish_function_try_block,
	finish_handler_sequence, finish_function_handler_sequence,
	begin_handler, finish_handler_parms, finish_handler,
	begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
	using statement lists.
	(begin_compound_stmt): Replace has_no_scope argument with flags.
	Update all callers.  Use statement lists.
	(finish_compound_stmt): Likewise.
	(finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
	(current_scope_stmt_stack): Remove.
	(simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
	* typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
	Rewrite with statement lists.
testsuite/
	* g++.dg/ext/stmtexpr1.C: XFAIL.
	* gcc.dg/20030612-1.c: XFAIL.

From-SVN: r83221
2004-06-15 18:21:38 -07:00
Paolo Bonzini 096f22f424 function.h (struct function): Remove cannot_inline field.
gcc/ChangeLog:
2004-06-15  Paolo Bonzini  <bonzini@gnu.org>

	* function.h (struct function): Remove cannot_inline field.
	(current_function_cannot_inline): Remove.
	* passes.c (rest_of_compilation): Reset DECL_DEFER_OUTPUT.
	Simplify conditionals to ignore warn_return_type.
	* tree-optimize.c (tree_rest_of_compilation): Do not reset
	DECL_DEFER_OUTPUT.
	* objc/objc-act.c (build_module_descriptor, finish_method_def):
	Do not set current_function_cannot_inline.

gcc/java/ChangeLog:
2004-06-15  Paolo Bonzini  <bonzini@gnu.org>

	* class.c (emit_register_classes): Make the function uninlinable,
	do not set current_function_cannot_inline.
	* resource.c (write_resource_constructor): Do not reset
	flag_inline_functions around rest_of_compilation.

gcc/cp/ChangeLog:
2004-06-15  Paolo Bonzini  <bonzini@gnu.org>

	* cp-tree.h (struct language_function): Remove cannot_inline.
	* decl.c (save_function_data): cannot_inline is no more.
	(cxx_push_function_context): Likewise.
	* decl2.c (start_objects, start_static_storage_duration_function):
	Reset DECL_INLINE, set DECL_UNINLINABLE.

From-SVN: r83181
2004-06-15 12:46:07 +00:00
Joseph Myers 132da1a5aa c-typeck.c (comptypes, [...]): Remove flags parameter.
* c-typeck.c (comptypes, tagged_types_tu_compatible_p,
	function_types_compatible_p, type_lists_compatible_p): Remove
	flags parameter.
	* c-tree.h (comptypes): Likewise.
	(COMPARE_STRICT): Remove.
	* c-decl.c, c-lang.c, c-parse.in, c-typeck.c, objc/objc-act.c: All
	callers changed.

From-SVN: r83061
2004-06-13 18:14:09 +01:00
Richard Henderson 7a3ea2011b c-parse.in (OFFSETOF, [...]): New.
* c-parse.in (OFFSETOF, offsetof_member_designator): New.
        (primary): Handle offsetof.  Add error productions for faux functions.
        Move component_ref objc checking to build_component_ref.
        (reswords): Add offsetof.
        (rid_to_yy): Add offsetof.
        * c-tree.h (build_offsetof): Declare.
        * c-common.h (objc_is_public): Declare.
        * c-typeck.c (build_component_ref): Check objc_is_public.
        (build_offsetof): New.
        * stub-objc.c (objc_is_public): New.
        * objc/objc-act.c, objc/objc-act.h (objc_is_public): Rename
        from is_public.
        * ginclude/stddef.h (offsetof): Use __builtin_offsetof.
        * doc/extend.texi (Offsetof): Move from C++ section to C section
        and rewrite for __builtin_offsetof.
cp/
        * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
        * parser.c (struct cp_parser): Remove in_offsetof.
        (cp_parser_new): Don't set it.
        (cp_parser_unary_expression): Don't check it.
        (cp_parser_postfix_open_square_expression): Split out from ...
        (cp_parser_postfix_expression): ... here.
        (cp_parser_postfix_dot_deref_expression): Likewise.
        (cp_parser_builtin_offsetof): New.
        (cp_parser_primary_expression): Use it.
testsuite/
        * g++.dg/template/dependent-expr4.C: Use __builtin_offsetof.

From-SVN: r82549
2004-06-01 08:12:23 -07:00
Nicola Pero 61c627ed2c re PR objc/7993 (private variables cannot be shadowed in subclasses)
2004-06-01  Nicola Pero  <nicola@brainstorm.co.uk>

 	Fix PR objc/7993:
	* objc-act.c (is_private): Do not emit the 'instance variable %s
	is declared private' error.
	(is_public): Emit the error after calling is_private.
	(lookup_objc_ivar): If the instance variable is private, return 0
	- the instance variable is invisible here.
testsuite:
	* objc.dg/private-1.m, objc-dg/private-2.m: New testcases.

From-SVN: r82532
2004-06-01 07:40:02 +00:00
Steven Bosscher 673fda6b48 c-gimplify.c (c_genericize): Replace calls via (*lang_hooks.foo) with lang_hooks.foo.
* c-gimplify.c (c_genericize):
	Replace calls via (*lang_hooks.foo) with lang_hooks.foo.
	* c-parse.in <expr_no_commas>: Likewise.
	<if_prefix>: Likewise.
	<select_or_iter_stmt>: Likewise.
	* expr.c (expand_var, expand_expr_real_1): Likewise.
	* expr.h (expand_expr): Make it a static inline function.
	Move prototype for expand_expr_real up before this.
	* fold-const.c (fold_relational_hi_lo, fold_relational_const):
	Likewise.
	* gimplify.c (gimple_boolify, gimplify_addr_expr,
	gimplify_asm_expr, gimplify_expr): Likewise.
	* tree-cfg.c (dump_tree_cfg, dump_cfg_stats, tree_cfg2vcg,
	dump_function_to_file): Likewise.
	* tree-dfa.c (dump_immediate_uses, dump_dfa_stats): Likewise.
	* tree-inline.c (remap_block, save_body, walk_tree): Likewise.
	* tree-into-ssa.c (dump_tree_ssa): Likewise.
	* tree-mudflap.c (mf_varname_tree, mf_file_function_line_tree):
	Likewise.
	* tree-optimize.c (execute_one_pass): Likewise.
	* tree-pretty-print.c (dump_generic_bb_buff): Likewise.
	* tree-ssa-alias.c (dump_alias_stats, dump_alias_info): Likewise.

objc/
	* objc-act.c (objc_build_try_enter_fragment,
	objc_build_try_epilogue, objc_build_catch_stmt,
	objc_build_finally_prologue): Replace calls via (*lang_hooks.foo)
	with lang_hooks.foo ().

From-SVN: r81907
2004-05-15 23:07:53 +00:00
Diego Novillo 6de9cd9a88 Merge tree-ssa-20020619-branch into mainline.
From-SVN: r81764
2004-05-13 02:41:07 -04:00
Caroline Tice 0855eab7a3 gcc.c (combine_flag): New global variable, for new driver option.
2004-04-05  Caroline Tice  <ctice@apple.com>

        * gcc.c (combine_flag): New global variable, for new driver option.
        (struct compiler): Add two new fields, to be used when
        combining multiple input files in a single pass (IMA).
        (default_compilers):  Add values for the new fields to all
        compiler entries. Modify the "@c" compiler entry for doing IMA
        properly with "-save-temps" and the "combine" flag.
        (option_map):  Add new driver option, "--combine", to tell driver
        to pass multiple input files to compiler at one time.
        (have_o_argbuf_index): New global variable.
        (store_arg): Modify to assign value to have_o_argbuf_index.
        (struct infile):  Add three new fields, to help with IMA.
        (display_help): Add help for new "combine" option.
        (process_command): Remove local variable have_o; add code to check
        for new "combine" option; remove assignment to combine_inputs.
        (do_spec_1):  Modify to deal with IMA better.
        (main): Make variable 'lang_n_infiles' local to entire function
        rather than to a single block.  Use flag combine_flag to
        determine whether to do IMA or not; Modify loop initializing
        infiles to deal properly with linker files.
        Add code for doing preprocessing in presence of
        IMA with "-save-temps" flag.  Modify "main" loop to handle
        multiple input files, in multiple languages, with or without
        preprocessing,  gracefully.
        * toplev.c (set_src_pwd): Modify to not complain if attempting to
        re-set it to same directory it's previously been set to (avoid
        irritating, meaningless warning messages when doing IMA with
        save-temps).
        * doc/invoke.texi: Add "-combine" to list of Overall Options;
        remove documentation about IMA that is no longer accurate; Add
        documentation explaining what "-combine" does.
        * ada/lang-specs.h: Add initialization values for new fields in
        "struct compiler".
        * cp/lang-specs.h: Likewise.
        * f/lang-specs.h: Likewise.
        * java/lang-specs.h: Likewise.
        * objc/lang-specs.h: Likewise.
        * treelang/lang-specs.h: Likewise.

Fix gcc driver to work properly with IMI.

From-SVN: r80435
2004-04-05 12:23:27 -07:00
Richard Kenner 4f976745b7 c-decl.c (build_compound_literal): Use TYPE_READONLY.
* c-decl.c (build_compound_literal): Use TYPE_READONLY.
	* emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise.
	* objc/objc-act.c (adorn_decl, gen_declspecs): Likewise.
	* c-typeck.c (decl_constant_value): Don't access DECL_INITIAL of a
	PARM_DECL.
	* calls.c (flags_from_decl_or_type): Use TYPE_READONLY and do so only
	for a type.
	* print-tree.c (print_node): Properly handle side-effects, readonly,
	and constant flags.
	* tree.c (build1_stat, build_expr_wfl): Only look at TREE_SIDE_EFFECTS
	and TREE_CONSTANT if not a type.
	* tree.h (IS_NON_TYPE_CODE_CLASS): New macro.
	(IS_EXPR_CODE_CLASS): Write 'E', not 'e'.
	(NON_TYPE_CHECK): New macro.
	(TREE_SIDE_EFFECT, TREE_READONLY, TREE_CONSTANT: Add check.

	* cp/init.c (decl_constant_value): Don't look at DECL_INITIAL
	of PARM_DECL.
	* cp/tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
	or TREE_SIDE_EFFECTS of a type.

	* ada/decl.c (gnat_to_gnu_entity): Use TYPE_READONLY.
	* ada/utils.c (create_field_decl): Likewise.
	* ada/utils2.c (build_unary_op, gnat_build_constructor): Likewise.

From-SVN: r80430
2004-04-05 08:25:26 -04:00