blob: 17a2794db03c201c78b905642200ee7da6e73ed1 [file] [log] [blame]
2009-02-11 Fariborz Jahanian <fjahanian@apple.com>
Radar 6573923
* decl.c (synth_block_byref_id_object_copy_func,
synth_block_byref_id_object_dispose_func): Set BLOCK_BYREF_CALLER
flag in call to copy/dispose helper functions.
2009-02-11 Fariborz Jahanian <fjahanian@apple.com>
Radar 6545782
* semantics.c (get_final_block_variable): New
(finish_id_expression): Call get_final_block_variable.
2008-12-05 Fariborz Jahanian <fjahanian@apple.com>
Radar 6413140
* parser.c (cp_parser_block_literal_expr): Warn on use of explicit
block return type.
2008-12-02 Fariborz Jahanian <fjahanian@apple.com>
Radar 6396238
* typeck.c (build_block_call): Handle case of a block
expression tree with side-effect when envoking the block.
2008-12-01 Fariborz Jahanian <fjahanian@apple.com>
Radar 6404979
* parser.c (cp_parser_block_literal_expr): Use an internal name for
block helper's hidden argument.
008-11-07 Fariborz Jahanian <fjahanian@apple.com>
Radar 5847976
* decl.c (synth_block_byref_id_object_copy_func): Takes new 'flag' argument
and produces the new much simplified API.
(synth_block_byref_id_object_dispose_func): Ditto.
(new_block_byref_decl): Turn off -fobjc-gc so we don't get
bogus warning on field declared as __weak.
(init_byref_decl): Takes a new 'flag' argument and passes
it down to synth_block_byref_id_object_copy_func and
synth_block_byref_id_object_dispose_func.
(cp_finish_decl): Calculates the flag for the block
variable declaration and passes it down to init_byref_decl.
* parser.c (build_block_struct_initlist): Removes call to
copy_in_object (not needed).
(synth_copy_helper_block_func): Produce the new, simplified
API.
(synth_destroy_helper_block_func): Ditto.
(build_block_byref_decl): Copy over COPYABLE_WEAK_BLOCK flag.
2008-10-31 Fariborz Jahanian <fjahanian@apple.com>
Radar 6175959
* parser.c (synth_copy_helper_block_func): Use the new API
_Block_object_assign for ObjC object copying.
(block_object_dispose): New
(synth_destroy_helper_block_func): Call block_object_dispose
to use new _Block_object_dispose API for ObjC object release.
2008-10-29 Fariborz Jahanian <fjahanian@apple.com>
Radar 6329245
* typeck.c (build_block_call): Block call is reverted back
to old ABI.
(build_block_descriptor_type): Removed "FuncPtr" field.
(build_generic_block_struct_type): This struct is partially reverted
to define a layout matching old ABI.
(build_block_struct_type): Ditto
(build_block_struct_initlist): Initializer list reflects the new
primary block layout.
2008-10-28 Fariborz Jahanian <fjahanian@apple.com>
Radar 6261630
* parser.c (cp_parser_objc_typename): Parse trailing attribute
in method type.
2008-10-27 Fariborz Jahanian <fjahanian@apple.com>
Radar 6231433
* typeck.c (objc_compare_types, objc_have_common_type):
Take an extra argument for better diagnostics.
* call.c: Ditto
2008-10-27 Fariborz Jahanian <fjahanian@apple.com>
Radar 6302949
* parser.c (objc_cp_parser_at_property): Warn on missing
',' separator for property attribute list.
2008-10-24 Fariborz Jahanian <fjahanian@apple.com>
Radar 6305545
* semantics.c (expand_or_defer_fn): Lower nested function
of the structors.
2008-10-24 Fariborz Jahanian <fjahanian@apple.com>
Radar 5847213 (minor tweak)
* parser.c (build_block_descriptor_type):
Make descriptor_ptr_type and descriptor_ptr_type_with_copydispose
visible to pch.
2008-10-22 Fariborz Jahanian <fjahanian@apple.com>
Radar 6310599
* typeck.c.c: All internal field names in block internal types
have '__' prefix.
* decl.c: Ditto
* semantics.c: Ditto
* pafrser.c: Ditto
2008-10-17 Fariborz Jahanian <fjahanian@apple.com>
Radar 6289031
* decl.c: Removed all code related to
radar 6083129 (byref escapes).
2008-10-15 Fariborz Jahanian <fjahanian@apple.com>
Radar 6271728
* parser.c (cp_parser_objc_method_definition_list): Method
definition always start with '{', or it is error.
2008-10-14 Fariborz Jahanian <fjahanian@apple.com>
Radar 6275956
* semantics.c (finish_this_expr): Reference to "this" in a block
must be looked up.
2008-10-10 Fariborz Jahanian <fjahanian@apple.com>
Radar 5847213 - New Block ABI
* typeck.c (build_block_call): New code gen for block call.
* parser.c (build_descriptor_block_decl) New
(build_block_struct_type): New block literal type.
(build_block_struct_initlist): New block literal initializers.
(build_block_literal_tmp): New block literal variable initialization.
(synth_copy_helper_block_func): Fixed a minor bug (unrelated to this radar).
(build_block_internal_types): Removed.
(build_block_descriptor_type): New routine to build build descriptor type.
(make_block_pointer_declarator): Unnecessary code is removed.
2008-10-02 Fariborz Jahanian <fjahanian@apple.com>
Radar 6246527
* parser.c (cp_parser_block_literal_expr): Call to do the delta
on printf attribute.
2008-09-30 Fariborz Jahanian <fjahanian@apple.com>
Radar 6230297
* parser.c (build_block_struct_initlist): 'trivial'
block temporary can be static as well.
(build_block_literal_tmp): Accomodate 'trivial' block
literal temporary variable as static.
2008-09-30 Fariborz Jahanian <fjahanian@apple.com>
Radar 6225809
* parser.c (build_block_byref_decl): Add __block vaiables
to intervening blocks.
2008-09-29 Fariborz Jahanian <fjahanian@apple.com>
Radar 6154598
tree.c (maybe_dummy_object): Build expression for
copied in "this" in the block.
2008-09-26 Fariborz Jahanian <fjahanian@apple.com>
Radar 6243400
* parser.c (build_block_struct_type): Mostly rewritten
to use C++'s API for building block's main struct so structors
for those data members requiring them are synthesized and
used.
2008-09-25 Fariborz Jahanian <fjahanian@apple.com>
Radar 6244520
* decl.c (new_block_byref_decl): New field added to
struct __Block_byref_x.
(init_byref_decl): Above field initialized to NULL.
2008-09-25 Fariborz Jahanian <fjahanian@apple.com>
Radar 6237713
* parser.c (cp_parser_block_literal_expr): Parse
and set attribute on block literals.
2008-09-16 Fariborz Jahanian <fjahanian@apple.com>
Radar 6214617
* parser.c (cp_block_requires_copying): New
(build_block_struct_type): Set BlockImportsCxxObjects flag.
(build_block_struct_initlist): Set BLOCK_HAS_CXX_OBJ if need be.
(synth_copy_helper_block_func): Call copy ctor if copied in object has one.
(synth_destroy_helper_block_func): Call dtor on cxx object.
2008-09-12 Fariborz Jahanian <fjahanian@apple.com>
Radar 6212722 (tweak)
* parser.c (build_block_ref_decl): Use decay_conversion.
2008-09-11 Fariborz Jahanian <fjahanian@apple.com>
Radar 6212722
* parser.c (build_block_ref_decl): Add support for arrays referenced
as copied in objects in blocks.
2008-09-09 Fariborz Jahanian <fjahanian@apple.com>
Radar 6169580
* decl.c (synth_block_byref_id_object_copy_func): Pass new flag
to finish_function.
(synth_block_byref_id_object_): Ditto.
(finish_function): Don't pop the nested class when synthesizing
block helpers.
* semantics.c (finish_id_expression): Added logic to attach
copied-in "this" to stand-alone field reference in a block.
* parser.c (synth_copy_helper_block_func, synth_destroy_helper_block_func):
Pass new flag to finish_function.
(cp_parser_block_literal_expr): When block is in non-static member
function, need to import "this" as a read-only copied in variable.
2008-09-05 Fariborz Jahanian <fjahanian@apple.com>
Radar 6169527
* parser.c (build_block_struct_type): Set CLASSTYPE_AS_BASE.
(build_block_internal_types): Ditto.
(build_block_struct_initlist): Rewritten.
(build_block_literal_tmp): Rewritten.
(build_block_ref_decl): Just add copied-in variable to
the scope.
(declare_block_prologue_local_vars): Rewritten.
(declare_block_prologue_local_byref_vars): New
(block_build_prologue): Call declare_block_prologue_local_byref_vars
for byref variables.
2008-09-03 Fariborz Jahanian <fjahanian@apple.com>
Radar 6185344
* typeck.c (check_return_expr): Added extra check
for return type checking.
* parser.c (cp_parser_direct_declarator): Added
extra check for type used as block return type.
(cp_parser_block_literal_expr): Parse and handle
user provided block return type syntax.
2008-08-28 Fariborz Jahanian <fjahanian@apple.com>
Radar 6160536
* parser.c (cp_parser_block_literal_expr): Call build_block_helper_name
to get pretty name for block helper function.
2008-08-28 Fariborz Jahanian <fjahanian@apple.com>
Radar 6180456
* decl.c (synth_block_byref_id_object_copy_func): Use different
API when copying __block object in c language.
(synth_block_byref_id_object_dispose_func): Use different
API when releasing a __block object in c.
* parser.c (synth_copy_helper_block_func): Refactored to
call build_block_byref_assign_copy_decl().
2008-08-27 Fariborz Jahanian <fjahanian@apple.com>
Radar 6087117
* typeck.c (convert_arguments): Takes an extra argument
for distiguinsing block call to function calls.
(build_function_call): Tell convert_arguments if we
are calling a block.
2008-08-22 Fariborz Jahanian <fjahanian@apple.com>
Radar 6172148
* parser.c (build_helper_func_decl): Set BLOCK_SYNTHESIZED_FUNC
for all block helper functions; used by die generation.
2008-08-24 Caroline Tice <ctice@apple.com.
Radar 6144664
* parser.c (build_block_byref_decl): Assign the
source location for each byref decl to the source
location of the helper function decl.
(build_block_ref_decl): Ditto for ref decls.
2008-08-06 Fariborz Jahanian <fjahanian@apple.com>
Radar 6040305 - work in proggress.
* parser.c (clean_and_exit): Clean up if inside
a function.
(cp_parser_block_literal_expr): Set DECL_NO_STATIC_CHAIN
if inside a function.
2008-08-05 Fariborz Jahanian <fjahanian@apple.com>
Radar 6040305 - work in progress.
* decl.c (cp_finish_decl): local static is treated just
like global static wrt __byref.
* semantics.c (finish_id_expression): Ditto.
2008-08-05 Fariborz Jahanian <fjahanian@apple.com>
Radar 6040305 - work in progress.
* decl.c (init_byref_decl): Generate c-style helper
functions for compose/dispose helpers.
2008-08-04 Fariborz Jahanian <fjahanian@apple.com>
Radar 6040305 - work in progress.
* decl.c (synth_block_byref_id_object_copy_func,
synth_block_byref_id_object_dispose_func,
block_start_struct, block_finish_struct,
new_block_byref_decl, init_byref_decl): New routines.
(cp_finish_decl): Build the APIed version of
a __byref local vriable.
* semantics.c (finish_id_expression): Add a __byref
variable to the list of such variables for current
block.
* parser.c (build_component_ref): Fix to make it work.
(cp_parser_block_literal_expr): Push/pop language-c,
set context of the helper function.
(declare_block_prologue_local_vars): Mend tree for
the built-in local variables in the helper prologue.
2008-07-31 Fariborz Jahanian <fjahanian@apple.com>
Radar 6040305 - work in progress
* objcp-lang.c (c_finish_return): Removed
* cp-lang.c (c_finish_return): Removed
* typeck.c (c_finish_return): Add
(check_return_expr): On error of a return
expresison inside a block return error_mark_node.
* semantics.c (finish_return_stmt): For helper
functions, return expression is already done.
2008-07-30 Fariborz Jahanian <fjahanian@apple.com>
Radar 6040305
* call.c (standard_conversion): Allow conversion of 'id'
type to a block pointer.
2008-07-30 Fariborz Jahanian <fjahanian@apple.com>
Radar 6040305
* typeck.c (build_block_call): New
(build_function_call): Call build_block_call
for block calls.
* call.c (standard_conversion): Remove "void *" to
block pointer conversion.
2008-07-29 Fariborz Jahanian <fjahanian@apple.com>
Radar 6040305
* call.c (standard_conversion): Allow assignment of
"void *" to block pointer object.
2008-07-28 Fariborz Jahanian <fjahanian@apple.com>
Radar 6040305
* typeck.c (comptypes): block-pointer types'
return type get special treatment.
2008-07-21 Fariborz Jahanian <fjahanian@apple.com>
Radar 6029624
* call.c (objcp_reference_related_p): New
* cp-tree.h (objcp_reference_related_p): New decl.
2008-07-16 Eugene Marinelli <marinelli@apple.com>
Radar 5559195
* decl.c (cxx_maybe_build_cleanup): When considering whether to
build a cleanup for a class type, use
CLASSTYPE_HAS_NONTRIVIAL_DESTRUCTOR_BODY and
CLASSTYPE_DESTRUCTOR_NONTRIVIAL_BECAUSE_OF_BASE instead of
TYPE_HAS_NONTRIVIAL_DESTRUCTOR to determine whether it must be
output.
2008-07-15 Eugene Marinelli <marinelli@apple.com>
Radar 5559195
* cp-tree.h (struct lang_type_class): Add destructor_triviality_final
flag to mark when has_nontrivial_destructor_body and
destructor_nontrivial_because_of_base are final. Add accessor for
this flag.
* parser.c (cp_parser_statement_seq_opt): Use
CLASSTYPE_DESTRUCTOR_TRIVIALITY_FINAL to determine if
destructor should be checked for being empty, and set it if
CLASSTYPE_HAS_NONTRIVIAL_DESTRUCTOR_BODY is changed.
2008-07-14 Eugene Marinelli <marinelli@apple.com>
* class.c (check_bases): Remove curly braces.
2008-07-10 Eugene Marinelli <marinelli@apple.com>
Radar 5559195
* init.c (push_base_cleanups): Check flags indicating whether
destructor of base class has a nontrivial body, has a base destructor
that must be called, or is private to determine whether it should be
called by the derived class. Set
CLASSTYPE_DESTRUCTOR_NONTRIVIAL_BECAUSE_OF_BASE to 1 if it has
members that must be deleted.
* class.c (check_bases, finish_struct_bits,
add_implicitly_declared_members): Set
CLASSTYPE_DESTRUCTOR_NONTRIVIAL_BECAUSE_OF_BASE and
CLASSTYPE_HAS_NONTRIVIAL_DESTRUCTOR_BODY based on base classes.
(check_methods): Set CLASSTYPE_HAS_NONTRIVIAL_DESTRUCTOR_BODY to 1
whenever a user-declared destructor is seen as a conservative
assumption.
* cp-tree.h (struct lang_type_class): Add
has_nontrivial_destructor_body and
destructor_nontrivial_because_of_base flags. Decrement remaining
dummy bits. Add accessors for these flags.
* parser.c (cp_parser_statement_seq_opt): Unmark
CLASSTYPE_HAS_NONTRIVIAL_DESTRUCTOR_BODY and then set it again only if
a statement is parsed.
2008-06-05 Fariborz Jahanian <fjahanian@apple.com>
Radar 5982990
* parser.c (cp_parser_compound_statement): Take a new
argument which is used to call objc_mark_locals_volatile.
(cp_parser_primary_expression, cp_parser_statement,
etc.): add extra argument in calling cp_parser_compound_statement.
(cp_parser_objc_synchronized_statement): Passes
flag_objc_sjlj_exceptions as last argument in calling
cp_parser_compound_statement.
2008-06-02 Fariborz Jahanian <fjahanian@apple.com>
Radar 5976344
* Parser.c (cp_parser_objc_interstitial_code): Allow template
declaration inside ObjC @implementation.
2008-05-30 Josh Conner <jconner@apple.com>
Radar 5933878
* method.c (implicitly_declare_fn): Set DECL_ALIGN, if needed.
Backport from 4.3:
2007-07-09 Geoffrey Keating <geoffk@apple.com>
PR 32617
* decl.c (cxx_init_decl_processing): Don't set
force_align_functions_log.
(grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
* typeck.c (cxx_alignof_expr): When alignof is used on a plain
FUNCTION_DECL, return its alignment.
2008-02-20 Fariborz Jahanian <fjahanian@apple.com>
Radar 5732232 - code gen part 2.
* cp-lang.c (c_finish_return): Defined these
templates to get a clean compile.
2008-05-01 Josh Conner <jconner@apple.com>
* optimize.c: Rewrite of structor shrinkage.
(enum in_charge_use): New.
(struct thunk_tree_walk_data): New.
(struct clone_info): New.
(maybe_alias_body): Remove.
(examine_tree_for_in_charge_use): New.
(compute_use_thunks): New.
(maybe_thunk_body): Rename to thunk_body. Remove
explicit in-charge parameter.
(find_earlier_clone): New.
(maybe_clone_body): Remove most of old decloner
patch, replace with new algorithm.
2008-03-20 Fariborz Jahanian <fjahanian@apple.com>
Radar 5802025
* typeck.c (finish_class_member_access_expr): Generate getter call
from an OBJC_PROPERTY_REFERENCE_EXPR.
2008-03-19 Fariborz Jahanian <fjahanian@apple.com>
Radar 5733674
* decl.c (expand_static_init): Generate write barrier for
static initialization in objective-c++ mode.
2007-11-29 Fariborz Jahanian <fjahanian@apple.com>
Radar 5619052
* pt.c (value_dependent_expression_p): @encode expression is
value-dependent if the operand is type-dependent.
(type_dependent_expression_p): Treat @encode same as 'sizeof'.
1007-10-26 Josh Conner <jconner@apple.com>
Radar 5562046
* typeck.c (build_ptrmemfunc1): Add kext support for ARM.
2007-08-23 Hui-May Chang <hm.chang@apple.com>
Radar 4869885
* class.c: Removed darwin_align_is_first_member_of_class.
2007-08-22 Fariborz Jahanian <fjahanian@apple.com>
Radar 4947311
* parser.c (cp_parser_objc_protocol_declaration): Takes attribute list
as extra argument and passes it down to
objc_declare_protocols/objc_start_protocol.
(cp_parser_objc_class_interface): Now receives attribute list as input.
(cp_parser_objc_declaration): Parses attribute list and passes it down
to cp_parser_objc_class_interface/cp_parser_objc_protocol_declaration.
2007-08-20 Fariborz Jahanian <fjahanian@apple.com>
Radar 5422751
* parser.c (cp_parser_objc_class_implementation): Unused syntax recognition
removed.
2007-07-27 Fariborz Jahanian <fjahanian@apple.com>
Radar 3742561
* typeck.c (build_modify_expr): Call to generate write barrier
for class assignment only when assignment is not overloaded.
2007-07-24 Fariborz Jahanian <fjahanian@apple.com>
Radar 5355344
* cp-tree.h (cp_objc_protocol_id_list): New declaration
* cp-lang.c (cp_objc_protocol_id_list): New stub
* parser.c (cp_parser_type_name): Added code to disambiguate
conditional from a protocol type.
(cp_parser_objc_tentative_protocol_refs_opt): New
2007-07-13 Fariborz Jahanian <fjahanian@apple.com>
Radar 5277239
* parser.c (cp_parser_objc_reference_expression): New routine to
build a property reference expression.
(cp_objc_property_reference_prefix): New routine to recognize a
property dot syntax.
(cp_parser_primary_expression): Build a property reference expression
when a property dot-syntax is recognized.
(cp_parser_type_name): Exclude property dot-syntax from being recognized
as a type name.
(cp_parser_class_name): Exclude property dot-syntax from being recognized
as a class name.
2007-07-10 Fariborz Jahanian <fjahanian@apple.com>
Radar 5285911
* typeck.c (finish_class_member_access_expr): Call
objc_build_property_reference_expr instead of objc_build_getter_call.
2007-06-29 Fariborz Jahanian <fjahanian@apple.com>
Radar 5276085
* typeck.c (build_modify_expr): Call objc_weak_reference_expr
instead of objc_remove_weak_read.
* parser.c (cp_parser_cast_expression): Call
objc_build_weak_reference_tree instead of objc_generate_weak_read.
(cp_parser_cast_expression): Ditto.
2007-06-20 Geoffrey Keating <geoffk@apple.com>
Radar 5281849
* decl2.c (determine_visibility_from_class): Remove old
'ms tinfo compat' change.
(determine_visibility): Rewrite here.
2007-06-21 Eric Christopher <echristo@apple.com>
Radar 5283703
* typeck.c (build_binary_op): Call cp_convert_and_check
instead of cp_convert.
* cvt.c (cp_convert_and_check): New.
* cp-tree.h: Declare above.
2007-06-06 Fariborz Jahanian <fjahanian@apple.com>
Radar 5250860 (Remove old property)
* cp/lex: Remove lexer's tokens and recognition for old property
syntax.
* cp/parser.c: Remove parsing of old property syntax.
2007-05-18 Fariborz Jahanian <fjahanian@apple.com>
Radar 5202926
* mangle.c (write_mangled_name): Removed suppression in last patch.
2007-05-15 Geoffrey Keating <geoffk@apple.com>
* mangle.c (write_mangled_name): Suppress static variable name
mangling for Objective-C.
2007-05-07 Fariborz Jahanian <fjahanian@apple.com>
Radar 4157812
* parser.c (cp_parser_objc_method_keyword_params): Recognize optional
method argument attribute.
2007-05-03 Mike Stump <mrs@apple.com>
Radar 5141790
* typeck2.c (process_init_constructor_array): Remove unneed APPLE
LOCAL code.
2007-05-03 Fariborz Jahanian <fjahanian@apple.com>
Radar 4874626
* decl2.c (emit_instantiate_pending_templates): Setting of
current input location moved to caller site.
2007-04-25 Fariborz Jahanian <fjahanian@apple.com>
Radar 4874613
* decl2.c (cp_finish_file): remove dump of pch file.
* parser.c (c_parse_file): Dump pch file if no parse errors.
2007-04-20 Fariborz Jahanian <fjahanian@apple.com>
Radar 5130983
* parser.c (cp_parser_parse_foreach_stmt): Parse selector expression
as an expression.
(objc_foreach_stmt): Issue diagnostic on non-lavlue selector
expression.
2007-04-18 Fariborz Jahanian <fjahanian@apple.com>
Radar 5128402
* parser.c (objc_finish_foreach_stmt): Set elem to nil at the else part
of the outer if-stmt instead of at the begining.
2007-04-11 Fariborz Jahanian <fjahanian@apple.com>
Radar 4872022
* parser.c (cp_parser_compound_statement): Return error_mark_node
on missing '{' (from mainline).
2007-03-29 Fariborz Jahanian <fjahanian@apple.com>
Radar 4947014 - objc atomic property
* lex.c (RID_NONATOMIC): Add
* parser.c (objc_cp_parser_at_property): Recognize 'nonatomic' as
new property attribute.
2007-03-29 Fariborz Jahanian <fjahanian@apple.com>
Radar 4564694
* lex.c (RID_AT_PACKAGE): Add
* parser.c (cp_lexer_get_preprocessor_token): Parse @package.
2007-03-23 Fariborz Jahanian <fjahanian@apple.com>
Radar 5085245 - fall out from 4965989 merge.
* parser.c (cp_parser_objc_superclass_or_category): Initialize is_category.
2007-03-22 Fariborz Jahanian <fjahanian@apple.com>
Radar 4965989
* parser.c (cp_parser_objc_superclass_or_category): Add supprt for
anonymous category syntax.
(cp_parser_objc_superclass_or_category, cp_parser_objc_class_interface): Changed because
of change to cp_parser_objc_superclass_or_category API.
2007-03-22 Fariborz Jahanian <fjahanian@apple.com>
Radar 4995967
* parser.c (cp_parser_objc_try_catch_finally_stateme): Parse @catch (...) unconditionally.
2007-03-21 Fariborz Jahanian <fjahanian@apple.com>
Radar 2848255
* except.c (do_begin_catch): Take a new argument to decide
to call objc_begin_catch for objc exceptions.
(objcp_build_eh_type_type): New.
(do_end_catch): Call objc_end_catch for objc type
exceptions.
(expand_start_catch_block): Add new argument to do_begin_catch call.
(build_throw): Call objc_throw_exception for throwing objc type objects.
* cp-tree.h (objc2_valid_objc_catch_type, objcp_build_eh_type_type):
New extern decl.
* parser.c (cp_parser_objc_try_catch_finally_stateme): Add syntax for
@catch(...).
2007-01-10 Eric Christopher <echristo@apple.com>
Radar 4869810
* decl.c (check_tag_decl): Remove code for 4168392.
2006-12-19 Fariborz Jahanian <fjahania@apple.com>
Radar 4874632
* typeck.c (convert_for_assignment): Allow for attribute checking
with -Wmissing-format-attribute for objective-c++.
2006-12-14 Fariborz Jahanian <fjahania@apple.com>
Radar 4712415
* parser.c (objc_cp_parse_property_decl): Parse attribute at end of
property decl.
2006-12-14 Fariborz Jahanian <fjahania@apple.com>
Radar 4854605
* parser.c (objc_foreach_stmt): Set iterator
to nil.
2006-11-14 Fariborz Jahanian <fjahania@apple.com>
Radar 4829851
* decl.c (duplicate_decls): Check for duplicate decl.
of objective-c @class.
2006-11-01 Fariborz Jahanian <fjahania@apple.com>
Radar 4805321 (new property).
* lex.c (reswords): New entries added for new property words.
(init_reswords): For new property, use RID_AT_DYNAMIC instead of
RID_DYNAMIC in old property.
* parser.c (objc_cp_parse_property_decl): Attach storage attribute
to property.
(objc_cp_parser_property_impl): New.
(objc_cp_parser_at_property): Handle new property attributes.
(cp_parser_objc_method_definition_list): Recognize @synthesize and
@dynamic directives.
2006-10-25 Fariborz Jahanian <fjahania@apple.com>
Radar 4795703 (also in gcc-4.2)
* parser.c (cp_parser_functional_cast):
Use 'type' correctly.
2006-10-10 Mike Stump <mrs@apple.com>
Radar 4739936
* parser.c (cp_lexer_peek_token): Restore error for invalid
integer suffixes.
(cp_lexer_iasm_bol): Avoid cp_lexer_peek_token.
(cp_parser_iasm_skip_to_eol): Likewise.
2006-09-18 Fariborz Jahanian <fjahania@apple.com>
Radar 4667060
* parser.c (objc_foreach_stmt): Save elem decl. in
foreach node.
2006-09-11 Josh Conner <jconner@apple.com>
Radar 4658012
Backport from mainline:
2006-09-06 Jason Merrill <jason@redhat.com>
PR c++/27371
* cvt.c (convert_to_void): Strip useless TARGET_EXPR.
* cp-tree.h (TARGET_EXPR_IMPLICIT_P): New macro.
* tree.c (build_cplus_new): Set it.
2006-09-01 Fariborz Jahanian <fjahania@apple.com>
Radar 4712269
* typeck.c (build_unary_op): Call objc_build_incr_decr_setter_call
for potential ince/decr pre/post expressions involving properties.
2006-08-31 Fariborz Jahanian <fjahanian@apple.com>
Radar 4697411
* typeck.c (build_class_member_access_expr): Call
objc_volatilize_component_ref.
2006-08-30 Fariborz Jahanian <fjahanian@apple.com>
Radar 4696522
* typeck.c (build_c_cast): Code for cast of objective-c
pointer moved to:
(build_static_cast_1).
2006-08-29 Fariborz Jahanian <fjahanian@apple.com>
Radar 4705250
* parser.c (cp_parser_member_declaration) : No error on use of @defs
with -fobjc-atdefs
2006-08-25 Josh Conner <jconner@apple.com>
* call.c (build_over_call): Add APPLE LOCAL markers for previous
patch.
2006-08-25 Josh Conner <jconner@apple.com>
Radar 4658012
Backport from mainline:
2006-08-22 Jason Merrill <jason@redhat.com>
PR c++/23372
* call.c (build_over_call): Don't make a copy here if build_call
will make one too.
2006-08-15 Fariborz Jahanian <fjahanian@apple.com>
Radar 4668465
* call.c (standard_conversion): In deciding on validity of
"pointer to cv D" to "pointer to cv B", ignore the
objective-c volatile type added to local object in presence of
sjlj's EH implementation.
2006-08-14 Fariborz Jahanian <fjahanian@apple.com>
Radar 4675792
* parser.c (objc_cp_parser_at_property): Accomodate when getter matches
a c++ keyword.
2006-07-25 Fariborz Jahanian <fjahanian@apple.com>
Radar 4652027
* parser.c (cp_parser_objc_class_ivars): Handle illegal declaration
of typdef.
2006-07-26 Hui-May Chang <hm.chang@apple.com>
Radar 4121962
* class.c (check_field_decls): Fix APPLE LOCAL markers.
* class.c (finish_struct_bits): Fix APPLE LOCAL markers.
2006-07-25 Hui-May Chang <hm.chang@apple.com>
Radar 4121962
* class.c (check_field_decls): Remove the extra argument in
calling "warning".
2006-07-24 Hui-May Chang <hm.chang@apple.com>
Radar 4121962
Backport from mainline:
2006-07-05 Jason Merrill <jason@redhat.com>
* class.c (check_field_decls): Check TYPE_PACKED after
stripping array types.
(finish_struct_bits): Don't copy TYPE_SIZE here.
2006-07-21 Fariborz Jahanian <fjahanian@apple.com>
Radar 4631818
* parser.c (cp_parser_parse_foreach_stmt): New.
(cp_parser_iteration_statement): Remove old code.
Replace it with call to cp_parser_parse_foreach_stmt.
(cp_parser_simple_declaration): Remove old code.
(cp_parser_init_declarator): Remove old code.
2006-07-18 Fariborz Jahanian <fjahanian@apple.com>
Radar 4592503
* class.c (layout_class_type): Check on illegal use of __weak
on struct fields.
* decl.c (start_decl): Check on illegal use of __weak on
variable declarations.
2006-07-14 Fariborz Jahanian <fjahanian@apple.com>
Radar 4621020
* lex.c (reswords): Added entry for 'weak' attribute keyword.
* parser.c (objc_cp_parser_at_property): Recorgnize 'weak'attribute.
2006-07-10 Fariborz Jahanian <fjahanian@apple.com>
Radar 3904247
* g++spec.c (lang_specific_driver): Handle -x objective-c++
and -ObjC++ to invoke -cc1objplus. -x objective-c and -ObjC
to invoke cc1obj.
2006-06-26 Fariborz Jahanian <fjahanian@apple.com>
Radar 4591909
* lex.c (reswords): New entry for 'dynamic' attribute.
* parser.c (objc_cp_parser_at_property): Change to parse new
attribute syntax.
2006-06-20 Howard Hinnint <hhinnant@apple.com>
Radar 4539933
* decl2.c (start_static_initialization_or_destruction): Create guard
variables for explicitly instantiated templated static data members.
2006-06-13 Fariborz Jahanian <fjahanian@apple.com>
Radar 4360010
* parser.c (cp_parser_objc_class_ivars): Issue diagnostic
for 'static' ivar.
2006-06-01 Fariborz Jahanian <fjahanian@apple.com>
Radar 4557092
* pt.c (tsubst_copy_and_build): Don't fold address of a const_decl
for a cfstring.
2006-05-18 Fariborz Jahanian <fjahanian@apple.com>
Radar 4548636 (objc attributes on class)
* parser.c (objc_attr_follwed_by_at_keyword): New routine to disambiguate
attribute before a type and attribute before an @interface declaration..
(cp_parser_declaration): Handle case of attribute list which can be
followed by an @interface.
(cp_parser_objc_class_interface): Parse possible attribute list before
parsing @interface.
(cp_parser_objc_declaration): Recognize 'attribute' as a valid token which
can start an @interface declaration.
2006-05-16 Fariborz Jahanian <fjahanian@apple.com>
Radar 4547045
* parser.c (objc_foreach_stmt): Fix a thinko.
2006-05-16 Devang Patel <dpatel@apple.com>
Radar 4546244
* parser.c (cp_lexer_consume_bincl_eincl_token): New.
(cp_lexer_peek_token, cp_lexer_consume_token): Use
cp_lexer_consume_bincl_eincl_token.
2006-04-10 Devang Patel <dpatel@apple.com>
Radar 4543648
* parser.c (cp_parser_enumerator_list, cp_parser_initializer_list); Remove redundant code.
2006-04-09 Devang Patel <dpatel@apple.com>
Radar 4531997
* parser.c (cp_lexer_handle_pragma_etc): Renamed as ...
(cp_lexer_handle_pragma): ... new name. Do not handle CPP_BINCL
or CPP_EINCL tokens.
(cp_lexer_peek_token): Skip CPP_BINCL and CPP_EINCL tokens.
(cp_lexer_peek_nth_token): Same.
(cp_lexer_consume_token): Consume CPP_BINCL and CPP_EINCL tokens.
(cp_parser_statement): Do not handle CPP_BINCL, CPP_EINCL tokens.
(cp_parser_declaration_seq_opt, cp_parser_enumerator_list,
cp_parser_initializer_clause, cp_parser_initializer_list,
cp_parser_member_specification_opt,
cp_parser_iasm_declaration_seq_opt, cp_parser_iasm_statement,
cp_parser_objc_interstitial_code): Same.
2006-05-09 Fariborz Jahanian <fjahanian@apple.com>
radar 4538105
* parser.c (objc_foreach_stmt): Mark element
selector as being used.
2006-05-09 Fariborz Jahanian <fjahanian@apple.com>
radar 4529200
* parser.c (cp_parser_init_declarator): Add '[' as another token
that can follow 'in'.
2006-05-05 Fariborz Jahanian <fjahanian@apple.com>
radar 4533974 - ObjC new protocol
* parser.c (cp_parser_objc_class_implementation): Support for
new '@implementation <protocol> @end' syntax.
2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
Radar 3803157 (method attributes)
* parser.c (cp_parser_objc_maybe_attributes): New.
(cp_parser_objc_method_keyword_params): Parse attributes at end
of method declaration.
(cp_parser_objc_method_tail_params_opt): Parse attributes after
'...'.
(cp_parser_objc_method_signature): Retreive method attribute for
the caller.
(cp_parser_objc_method_prototype_list): Pass new arg. to
cp_parser_objc_method_signature and pass attributes to
objc_add_method_declaration.
(cp_parser_objc_method_definition_list): Pass new arg. to
cp_parser_objc_method_signature and pass attributes to
objc_start_method_definition.
2006-04-19 Fariborz Jahanian <fjahanian@apple.com>
Radar 4516785
* parser.c (cp_parser_simple_type_specifier): Don't lookup for objc object types
if type is scope qualified.
2006-04-18 Devang Patel <dpatel@apple.com>
Radar 4517944
* parser.c (cp_parser_enumerator_list): Eat CPP_BINCL and CPP_EINCL
tokens.
2006-04-13 Devang Patel <dpatel@apple.com>
Radar 4503682
* parser.c (cp_lexer_new_main): Eat CPP_BINCL, CPP_EINCL tokens.
2006-04-12 Fariborz Jahanian <fjahanian@apple.com>
Radar 4507230
* parser.c (objc_foreach_stmt): Check for valid objc
objects in foreach header.
2006-04-06 Fariborz Jahanian <fjahanian@apple.com>
Radar 4436866
(Missing copies attribute)
* lex.c (reswords): New keyword 'copies' added.
* parser.c (objc_cp_parser_at_property): Parse 'copies'
attribute.
2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
Radar 4133425
* lex.c (unqualified_name_lookup_error): Issue doagnostic
for private 'ivar' access.
2006-03-24 Devang Patel <dpatel@apple.com>
Radar 4484026
* parser.c (cp_parser_enumerator_list): Eat CPP_BINCL and
CPP_EINCL tokens.
2006-03-23 Devang Patel <dpatel@apple.com>
Radar 4488417
* parser.c (cp_parser_initializer_clause): Check CPP_BINCL/CPP_EINCL
tokens before checking CPP_OPEN_BRACE.
2006-03-22 Fariborz Jahanian <fjahanian@apple.com>
Radar 4436866
* typeck.c (finish_class_member_access_expr): Call objc_build_getter_call.
(build_modify_expr): Call objc_build_setter_call.
* lex.c: Add keyword @property and context sensitive lexical tokens for
readonly, getter, setter, ivar attribute names.
* parser.c (objc_cp_parse_property_decl): New.
(objc_cp_parser_at_property): New.
(cp_parser_objc_method_prototype_list): Process @property keyword.
(cp_parser_objc_method_definition_list): Ditto.
2006-03-16 Devang Patel <dpatel@apple.com>
Radar 4461042
* cp/parser.c (cp_parser_initializer_clause): Eat CPP_BINCL/CPP_EINCL
tokens.
(cp_parser_initializer_list): Same.
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-02-28 Devang Patel <dpatel@apple.com>
Ziemowit Laski <zlaski@apple.com>
Radar 4137741
* cp-objcp-common.h: Revert Radar 4133801 changes.
* cp-tree.h: Likewise.
* decl2.c: Likewise.
* parser.c: Likewise.
(cp_lexer_handle_pragma): Rename to cp_lexer_handle_pragma_etc();
handle CPP_BINCL and CPP_EINCL tokens in addition to CPP_PRAGMA.
(cp_lexer_new_main): Set defer_file_change_debug_hooks flag
in preprocessor.
(cp_parser_statement, cp_parser_declaration_seq_opt,
cp_parser_member_specification_opt, cp_parser_cw_asm_declaration_seq_opt,
cp_parser_cw_asm_statement, cp_parser_objc_interstitial_code):
Call cp_lexer_handle_pragma_etc() for CPP_BINCL and CPP_EINCL tokens
also.
2006-02-15 Fariborz Jahanian <fjahanian@apple.com>
Radar 4445586
* semantics.c (begin_do_stmt): DO_STMT nodes take an
extra argument to build.
2006-02-15 Fariborz Jahanian <fjahanian@apple.com>
Radar 4441551
* parser.c (cp_parser_member_declaration): Warning on @defs as needed.
* typeck.c (build_c_cast): Call diagnose_selector_cast.
006-02-13 Fariborz Jahanian <fjahanian@apple.com>
Radar 4442245
* typeck.c (build_class_member_access_expr):
Check for a valid member declaration before calling
objc_v2_build_ivar_ref.
006-02-02 Fariborz Jahanian <fjahanian@apple.com>
Radar 4426814
* typeck.c (build_modify_expr): Undo call to objc_read_weak
on LHS of the assignment.
* parser.c (cp_parser_cast_expression): Central place to add
objc_read_weak call on expressions of __weak objects.
2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
Radar 4386773
* cp/lex.c (reswords): Add two new entries for @optional
and @required keywords.
* cp/parser.c (cp_parser_objc_interstitial_code): For
@optional/@required set the optional/required flag.
2006-01-18 Fariborz Jahanian <fjahanian@apple.com>
Radar 4294910
* cp/parser.c (objc_foreach_stmt): Fix typo in diagnostic.
2006-01-18 Fariborz Jahanian <fjahanian@apple.com>
Radar 4294910
* cp/parser.c (objc_foreach_stmt, objc_finish_foreach_stmt): New
functions.
(cp_parser_iteration_statement): Check for a parsed
foreach statement initialization and call objc_foreach_stmt instead.
(cp_parser_simple_declaration): Take evasive action for a
foreach initialization part.
(cp_parser_init_declarator): Parse and recognize a foreach
initialization part.
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-12-06 Fariborz Jahanian <fjahanian@apple.com>
Radar 4360146
* typeck.c (build_class_member_access_expr): Build the new ivar
reference tree.
2006-05-18 Mike Stump <mrs@apple.com>
Radar 4501833
* parser.c (cp_parser_compound_statement): Use iasm_end_block to
end inline assmebly blocks.
(cp_parser_iasm_compound_statement): Likewise.
(cp_parser_iasm_top_statement): Likewise.
2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
Radar 4508851
* parser.c (cp_parser_objc_interstitial_code): Recognize
and parse RID_NAMESPACE keyword.
2006-04-26 Mike Stump <mrs@apple.com>
Radar 4505741
Rename cw_ to iasm_:
See ../ChangeLog.apple-ppc for additional changes.
* cp-tree.h: Rename ds_cw_asm to ds_iasm_asm.
* decl.c: Likewise.
Rename cw_asm_p to iasm_p.
* parser.c: Likewise.
Rename cp_lexer_cw_bol to cp_lexer_iasm_bol.
Rename cp_parser_cw_asm_compound_statement to cp_parser_iasm_compound_statement.
Rename cp_parser_cw_asm_top_statement to cp_parser_iasm_top_statement.
Rename cp_parser_cw_asm_declaration_seq_opt to cp_parser_iasm_declaration_seq_opt.
Rename cp_parser_cw_asm_line_seq_opt to cp_parser_iasm_line_seq_opt.
Rename cp_parser_cw_asm_line to cp_parser_iasm_line.
Rename cp_parser_cw_skip_to_eol to cp_parser_iasm_skip_to_eol.
Rename cp_parser_cw_maybe_skip_comments to cp_parser_iasm_maybe_skip_comments.
Rename cp_parser_cw_asm_statement_seq_opt to cp_parser_iasm_statement_seq_opt.
Rename cw_build_identifier_string to iasm_build_identifier_string.
Rename cp_parser_cw_identifier to cp_parser_iasm_identifier.
Rename cp_parser_cw_identifier_or_number to cp_parser_iasm_identifier_or_number.
Rename cp_parser_cw_asm_maybe_prefix to cp_parser_iasm_maybe_prefix.
Rename cp_parser_cw_asm_statement to cp_parser_iasm_statement.
Rename cp_parser_cw_skip_to_next_asm to cp_parser_iasm_skip_to_next_asm.
Rename cp_parser_cw_asm_operands to cp_parser_iasm_operands.
Rename cp_parser_cw_asm_operand to cp_parser_iasm_operand.
Rename cp_parser_cw_asm_relative_branch to cp_parser_iasm_relative_branch.
Rename cp_parser_cw_asm_postfix_expression to cp_parser_iasm_postfix_expression.
* semantics.c: Likewise.
Rename cw_asm_cp_build_component_ref to iasm_cp_build_component_ref.
2006-04-17 Devang Patel <dpatel@apple.com>
Radar 4499790
* parser.c (cp_parser_string_literal): Enable pascal strings for
wchars.
2006-04-12 Mike Stump <mrs@apple.com>
Radar 4477426 4466768
* parser.c (cw_build_identifier_string): Handle pseudo instructions bettter.
2006-03-13 Mike Stump <mrs@apple.com>
Radar 4230099
* decl2.c (determine_visibility): Add suppport for
-fvisibility-ms-compat.
* decl.c (cxx_init_decl_processing): Likewise.
2006-02-08 Mike Stump <mrs@apple.com>
Radar 4407059
* parser.c (cp_parser_unary_operator): Only recognize "offset"
when doing x86 assembly.
2006-01-20 Mike Stump <mrs@apple.com>
Radar 4381918
* decl.c (start_preparsed_function): Avoid warnings about lack of return
in asm functions.
2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
Radar 4278774
* pt.c (cxx_sizeof_or_alignof_expr): Instantiate @endcode(T).
* parser.c (cp_parser_objc_encode_expression): Build a templatized
parse tree for @encode(T).
2005-12-13 Mike Stump <mrs@apple.com>
* Revert 2005-12-07 Devang Patel <dpatel@apple.com> Radar 4137741
2005-12-08 Mike Stump <mrs@apple.com>
Radar 4371551
* parser.c (cp_parser_cw_asm_postfix_expression): Also handle
exprs with no type.
2005-12-07 Devang Patel <dpatel@apple.com>
Ziemowit Laski <zlaski@apple.com>
Radar 4137741
* cp-objcp-common.h: Revert Radar 4133801 changes.
* cp-tree.h: Likewise.
* decl2.c: Likewise.
* parser.c: Likewise.
(cp_lexer_handle_pragma): Rename to cp_lexer_handle_pragma_etc();
handle CPP_BINCL and CPP_EINCL tokens in addition to CPP_PRAGMA.
(cp_lexer_new_main): Set defer_file_change_debug_hooks flag
in preprocessor.
(cp_parser_statement, cp_parser_declaration_seq_opt,
cp_parser_member_specification_opt, cp_parser_cw_asm_declaration_seq_opt,
cp_parser_cw_asm_statement, cp_parser_objc_interstitial_code):
Call cp_lexer_handle_pragma_etc() for CPP_BINCL and CPP_EINCL tokens
also.
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.
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-10-04 Devang Patel <dpatel@apple.com>
Radar 4278470
* parser.c (cp_lexer_new_main): Initialized saved_pos.value.
2005-09-23 Mike Stump <mrs@apple.com>
Radar 4259442
* parser.c (cp_parser_compound_statement): Handle opcode int.
(cp_parser_asm_definition): Add statement_p parameter.
Handle opcode int.
(cp_parser_cw_identifier): Handle opcode int.
(cw_asm_typename_or_reserved): Likewise.
2005-09-15 Fariborz Jahanian <fjahanian@apple.com>
Radar 4258924
* cp/parser.c (cp_parser_cw_asm_postfix_expression): Add check for
FUNCTION_DECL during lookahead.
2005-09-14 Fariborz Jahanian <fjahanian@apple.com>
Radar 4257049
* cp/parser.c (cw_asm_typename_or_reserved): Check for typename.
2005-08-23 Mike Stump <mrs@apple.com>
Radar 4211971
* parser.c (cp_parser_primary_expression): Add support for complex memory
addressing.
(cp_parser_cw_asm_postfix_expression): Likewise.
* typeck.c (build_x_binary_op): Likewise.
2005-08-19 Mike Stump <mrs@apple.com>
Radar 4211947
* parser.c (cp_parser_cw_maybe_skip_comments): Add support for
; comments.
(cp_parser_asm_definition): Likewise.
(cp_parser_cw_skip_to_eol): Likewise.
(cp_parser_cw_maybe_skip_comments): Likewise.
(cp_parser_cw_asm_top_statement): Likewise.
(cp_parser_cw_asm_statement_seq_opt): Likewise.
(cp_parser_cw_asm_statement): Likewise.
2005-08-18 Mike Stump <mrs@apple.com>
Radar 4214021
* parser.c (cp_parser_asm_definition): Add asm nop support.
(cp_parser_cw_asm_top_statement): Likewise.
(cp_parser_cw_asm_declaration_seq_opt): Likewise.
(cp_parser_cw_asm_operands): Likewise.
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.
(cp_parser_objc_method_prototype_list,
cp_parser_objc_method_definition_list): Bail out if end-of-file
is seen; issue error if trailing '@end' is not seen.
2005-07-25 Fariborz Jahanian <fjahanian@apple.com>
Radar 4205577
* cp/parser.c (cp_parser_cw_asm_postfix_expression) .align can also
be preceeded by a label_decl (because of recent changes).
2005-07-25 Fariborz Jahanian <fjahanian@apple.com>
Radar 4187916
* cp-tree.h (can_convert_arg, fn_type_unification): New argument.
* call.c (add_template_candidate_real): Pass down 'flags' to
fn_type_unification.
(can_convert_arg): New 'flags' argument. Pass it to call to
implicit_conversion instead of LOOKUP_NORMAL.
* class.c (resolve_address_of_overloaded_function): Add
LOOKUP_NORMAL in call to can_convert_arg.
(resolve_address_of_overloaded_function): Ditto.
* decl.c (reshape_init, check_default_argument): Ditto.
* typeck.c (build_ptrmemfunc): Ditto.
* typeck2.c (digest_init): Ditto.
(unify): Add LOOKUP_NORMAL to call to type_unification_real.
* pt.c (type_unification_real): Add 'flags' argument.
(fn_type_unification): Pass 'flags' to type_unification_real.
(type_unification_real): Pass new 'flags' argument to call to
can_convert_arg.
2005-08-02 Ziemowit Laski <zlaski@apple.com>
Radar 4185810
* parser.c (cp_parser_compound_statement): Continue
parsing even if the initial '{' is missing; an error
message is already being produced.
(cp_parser_statement_seq_opt): In addition to '}' and
end-of-file, a statement sequence may also be terminated
by a stray 'else' or '@end'.
2005-07-22 Devang Patel <dpatel@apple.com>
Radar 4182972
* name-lookup.c (pushtag): Do not set DECL_IGNORED_P bit.
* decl.c (grokdeclarator): Do not generate debug info for anonymous
aggregate type when it receives real name.
2005-07-26 Ziemowit Laski <zlaski@apple.com>
Radar 4168392
* decl.c (check_tag_decl): In '-fms-extensions' mode,
turn anonymous fields of aggregate (struct or union) type
into anonymous aggregates. For structs, issue a warning
if in '-pedantic' mode.
2005-07-25 Devang Patel <dpatel@apple.com>
Radar 4184203
Undo PR c++/1016 patch.
2005-03-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* cp-tree.h (pushtag): Adjust declaration.
* decl.c (lookup_and_check_tag): Call lookup_type_scope if
lookup_name fails.
(xref_tag): Adjust call to pushtag. Make hidden class visible.
(start_enum): Adjust call to pushtag.
* name-lookup.c (ambiguous_decl): Ignore hidden names.
(qualify_lookup): Change return type to bool.
(hidden_name_p): New function.
(lookup_namespace_name, unqualified_namespace_lookup,
lookup_name_real): Use it.
(lookup_type_scope): Update comments.
(maybe_process_template_type_declaration): Change parameter name
from globalize to is_friend.
(pushtag): Change globalize parameter of type int to tag_scope.
Hide name if introduced by friend declaration.
* name-lookup.h (hidden_name_p): Add declaration.
* parser.c (cp_parser_lookup_name): Don't deal with hidden name
here.
* pt.c (push_template_decl_real): Make hidden class template
visible.
(lookup_template_class, instantiate_class_template): Adjust call
to pushtag.
* semantics.c (begin_class_definition): Likewise.
* rtti.c (init_rtti_processing, build_dynamic_cast_1,
tinfo_base_init, emit_support_tinfos): Use ts_current instead of
ts_global.
2005-07-22 Devang Patel <dpatel@apple.com>
Radar 4167759
* class.c (finish_struct_1): Limit debug info for ctors/dtors.
(cp_set_decl_ignore_flag): New.
* cp-tree.h (cp_set_decl_ignore_flag): New.
* search.c (note_debug_info_needed): Limit debug info for ctors/dtors.
2005-07-22 Devang Patel <dpatel@apple.com>
Radar 4182972
* name-lookup.c (pushtag): Update comment.
* decl.c (grokdeclarator): Generate debug info for anonymous aggregate
type when it receives real name.
2005-07-18 Ziemowit Laski <zlaski@apple.com>
Radar 4175534
* call.c (standard_conversion): Do not issue warnings when
comparing ObjC pointer types.
2005-06-30 Devang Patel <dpatel@apple.com>
* lang-specs.h: While making PCH, invoke as if -fsave-repository
is used.
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.
2005-06-15 Devang Patel <dpatel@apple.com>
* parser.c (struct cp_lexer_file): Do not use GTY markers.
* decl2.c (cp_finish_file): Flush lexer file stack before writing PCH.
2005-06-02 Devang Patel <dpatel@apple.com>
Radar 4133801
* parser.c (struct cp_lexer_file): Decorate using GTY markers.
(cp_lexer_new_main): Initialize fields of new tokens.
2005-06-02 Devang Patel <dpatel@apple.com>
Radar 4133801
* cp-tree.h (cp_flush_lexer_file_stack): New.
* parser.c (cp_flush_lexer_file_stack): New.
(cp_lexer_file_stack, last_cp_lexer_file): Make static.
(cp_add_lexer_file): Initialize next field.
* decl2.c (cp_finish_file): Flush cp_lexer_file_stack.
2005-05-19 Ziemowit Laski <zlaski@apple.com>
Radar 4035492
* class.c (layout_class_type): Do not issue C++ ABI warnings for
ObjC structs.
* decl.c (objc_mark_locals_volatile): Streamline by calling
objc_volatilize_decl().
* parser.c (cp_parser_objc_message_expression): Allow simple type
specifiers (instead of merely type names) as message receivers.
* pt.c (template_args_equal): Do not call objc_comptypes().
* typeck.c (composite_pointer_type): If both pointers are ObjC-esque,
arbitrarily choose the first; do not call objc_comptypes().
(comp_array_types): Do not call objc_comptypes().
(convert_for_assignment): Call objc_compare_types().
(comp_ptr_ttypes_real): Call objc_type_quals_match() before
concluding that types do not match.
2005-06-01 Devang Patel <dpatel@apple.com>
Radar 4133801
* Make-lang.in (cp/parser.o): Depend on debug.h.
* cp-objcp-common.h (LANG_HOOKS_START_SOURCE_FILE,
LANG_HOOKS_END_SOURCE_FILE): New.
* cp-tree.h (cp_start_source_file, cp_end_source_file): New.
* parser.c (debug.h): Include.
(enum cp_file_entry_kind): New.
(struct cp_lexer_file): New.
(cp_lexer_file_stack, last_cp_lexer_file): New.
(cp_add_lexer_file, cp_lexer_copy_token, cp_parser_bincl_eincl): New.
(cp_lexer_new_main): Insert new CPP_BINCL and CPP_EINCL tokens based
on cp_lexer_file_stack.
(cp_lexer_peek_nth_token): Skip CPP_BINCL and CPP_EINCL tokens.
(cp_lexer_peek_token): Process CPP_BINCL and CPP_EINCL tokens.
2005-04-25 Ziemowit Laski <zlaski@apple.com>
Radar 4094385
* semantics.c (finish_id_expression): Correctly retrieve function
candidate from a BASELINK node, if one was provided.
2005-04-20 Mike Stump <mrs@apple.com>
Radar 4077104
* parser.c (cp_parser_unary_expression): Handle -40(sp) in CW asms better.
2005-04-20 Devang Patel <dpatel@apple.com>
Radar 4093536
Undo PR libstdc++/10606 fix.
2005-02-18 Richard Henderson <rth@redhat.com>
PR libstdc++/10606
* except.c (do_get_exception_ptr): New.
(expand_start_catch_block): Use it.
2005-04-08 Ziemowit Laski <zlaski@apple.com>
Radar 4055183
* typeck.c (build_function_call): Call
objc_rewrite_function_call() to handle casts.
2005-03-11 Ziemowit Laski <zlaski@apple.com>
Radar 3995882
* decl.c (objc_mark_locals_volatile): Mark local variables and
parameters 'volatile' in ways expected by the C++ front-end.
2005-03-07 Devang Patel <dpatel@apple.com>
* class.c (tree-iterator.h): Include.
2005-03-02 Robert Bowdidge <bowdidge@apple.com
Radar 4025293
* cp/typeck.c (convert_member_func_to_ptr) Ban casts from pointer-to-
member-function to pointer-to-function whenever the -fapple-kext flag
was passed to the compiler. Behavior changed between 3.3 and 4.0 in
incompatible ways, and the IOKit team wants all kexts to use a macro
that provides the correct (3.3) behavior.
2005-02-21 Ziemowit Laski <zlaski@apple.com>
Radar 3809189
* typeck2.c (digest_init): Factor out Pascal-ness of string
initializer; allow NUL terminator to not fit into the array
being initialized.
2005-02-18 Ziemowit Laski <zlaski@apple.com>
Radar 4011192
* parser.c (cp_parser_objc_try_catch_finally_statement): When
parsing '@finally' blocks, make sure the compound statement
winds up in a special STATEMENT_LIST instead of current scope.
(cp_parser_objc_synchronized_statement): Likewise for
'@synchronized' blocks.
2005-02-17 Ziemowit Laski <zlaski@apple.com>
Radar 3635843, 3922342
* tree.c (lvalue_or_else): Do not emit warning if
'-Wno-non-lvalue-assign' has been specified.
* typeck.c (build_modify_expr): Call
objc_generate_write_barrier() if '-fobjc-gc' has been specified.
2005-02-16 Fariborz Jahanian <fjahanian@apple.com>
Radar 3971074
* parser.c (cp_parser_cw_asm_statement): Pass lineno to cw_asm_stmt.
2005-02-16 Fariborz Jahanian <fjahanian@apple.com>
Radar 3970655
* cp/parser.c (cw_build_identifier_string): New function.
(cp_parser_cw_identifier): Build the tree for a '.'identifier.
(cp_parser_cw_asm_postfix_expression): Some disambiguation case.
2005-02-10 Ziemowit Laski <zlaski@apple.com>
Radar 3993052
* parser.c (cp_parser_objc_interstitial_code): New routine.
(cp_parser_objc_method_prototype_list): Call
cp_parser_objc_interstitial_code() instead of doing
non-ObjC++ parsing locally.
(cp_parser_objc_method_definition_list): Likewise.
2005-02-10 Ziemowit Laski <zlaski@apple.com>
Radar 3982256
* cp-objcp-common.h (cxx_get_alias_set,
cxx_warn_unused_global_decl, cp_expr_size, cp_tree_size,
cp_var_mod_type_p, cxx_initialize_diagnostics,
cxx_types_compatible_p): Move prototypes ...
* cp-tree.h: ... here.
2005-02-08 Ziemowit Laski <zlaski@apple.com>
Radar 3987120
* parser.c (cp_parser_objc_encode_expression): Call
'complete_type (cp_parser_type_id ())' instead of
'cp_parser_objc_typename ()' to retrieve argument type.
2005-02-02 Ziemowit Laski <zlaski@apple.com>
Radar 3978104
* parser.c (cp_parser_objc_method_prototype_list): Allow stray
semicolons in between method signatures.
2005-01-31 Ziemowit Laski <zlaski@apple.com>
Radar 3978168
* tree.c (lvalue_or_else): Allow certain non-lvalues
as arguments to '&', and print appropriate warning.
2005-01-27 Ziemowit Laski <zlaski@apple.com>
Radar 3971244
* typeck.c (composite_pointer_type): Check for
ObjC subtype relations.
2005-01-26 Matt Austern <austern@apple.com>
Radar 3972840
* call.c (build_over_call): Set type of function node correctly.
Type returned by build_vfn_ref_using_vtable is *not* what we
want.
* class.c (build_vfn_ref_using_vtable): Duplicate logic in
build_vfn_ref for setting attributes of vtable array ref node.
2005-01-26 Devang Patel <dpatel@apple.com>
Radar 3971329
* parser.c (cp_parser_objc_method_definition_list): Parse extern
linkage specification.
2005-01-24 Ziemowit Laski <zlaski@apple.com>
Radar 3968938
* parser.c (cp_parser_simple_type_specifier): After
constructing a protocol-qualified ObjC type, record
it in the DECL_SPECS structure.
2005-01-23 Ziemowit Laski <zlaski@apple.com>
Radar 3961973
* cp-tree.h (lvalue_or_else): Change type of first parameter
from 'tree' to 'tree *'.
* tree.c (lvalue_or_else): Change first parameter from
'tree' to 'tree *'; handle conditional lvalues in addition
to lvalue casts; when rewriting expressions, create a new
tree instead of clobbering an existing one.
* typeck.c (build_unary_op, build_modify_expr): Adjust
calls to lvalue_or_else().
2005-01-19 Matt Austern <austern@apple.com>
Radar 3960754
* typeck.c (comptypes): Handle return code from objc_comptypes
correctly.
2005-01-18 Mike Stump <mrs@apple.com>
Radar 3956093
* class.c (has_apple_kext_compatibility_attr_p): Avoid problems
when there are no base classes.
2005-01-18 Ziemowit Laski <zlaski@apple.com>
* parser.c (cp_parser_cw_identifier): Reapply change
just reverted.
2005-01-18 Ziemowit Laski <zlaski@apple.com>
* parser.c (cp_parser_cw_identifier): Revert change
from 2005-01-14.
2005-01-17 Ziemowit Laski <zlaski@apple.com>
Radar 3955336
* parser.c (cp_parser_objc_message_receiver): Try parsing
receiver as an expression first; failing that, as a
nested type.
2005-01-17 Ziemowit Laski <zlaski@apple.com>
Radar 3951689
* parser.c (cp_parser_objc_try_catch_finally_statement,
cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement
cp_parser_objc_statement): New functions.
(cp_parser_statement): Call cp_parser_objc_statement() to
parse Objective-C statements.
2005-01-15 Geoffrey Keating <geoffk@apple.com>
* g++spec.c: Remove APPLE LOCAL changes involving
macosx_version_min_required.
2005-01-14 Ziemowit Laski <zlaski@apple.com>
* parser.c (cp_parser_cw_identifier): Add a default:
to squash compiler warnings.
2005-01-08 Ziemowit Laski <zlaski@apple.com>
Radar 3913725
* tree.c (lvalue_or_else): If expression is not an lvalue,
check if it is a cast of an lvalue; if so, and if the cast
involves POD types with identical size and aligment,
rewrite '(type)expr' into '*(type *)&expr' and allow the
result as an lvalue.
2005-01-07 Devang Patel <dpatel@apple.com>
Radar 3943502
* parser.c (cp_parser_objc_defs_expression): New.
(cp_parser_member_declaration): Handle @defs.
2005-01-06 Robert Bowdidge <bowdidge@apple.com>
Radar 3943783
* class.c: change has_apple_kext_compatibility_attr_p to use
BINFO_BASE_BINFO for walking class hierarchy.
2005-01-06 Devang Patel <dpatel@apple.com>
Radar 3941766
* parser.c (cp_parser_objc_class_ivars): Add '}' check.
2005-01-05 Mark Mitchell <mark@codesourcery.com>
Matt Austern <austern@apple.com>
Radar 3934803
PR c++/18369
* init.c (build_new_1): Handle parenthesized type-ids that name an
array type. Tidy.
2004-12-20 Matt Austern <austern@apple.com>
Radar 3845716
PR c++/19044
* decl.c (make_rtl_for_nonlocal_decl): Use set_builtin_user_assembler_name
2004-12-10 Ziemowit Laski <zlaski@apple.com>
Radar 3640156, 3877958
* decl.c (builtin_function_1): Do not require subsequent declarations
for AltiVec PIM builtins.
2004-12-07 Mike Stump <mrs@apple.com>
Radar 3603833, 3896176, 3518821.
* parser.c (cp_parser_binary_expression): Add support for lines
that start with named operators such as and.
(cp_parser_cw_identifier): Move reused code from here to
cw_get_identifier.
2004-11-17 Mike Stump <mrs@apple.com>
Radar 3860322
g++.dg/asm-block-3.C
* parser.c (cp_parser_cw_identifier): Handle C++ keywords like
and, or, xor in CW asm blocks.
2004-11-14 Ziemowit Laski <zlaski@apple.com>
Radar 3877761
* parser.c (cp_parser_objc_class_ivars): Allow an optional
trailing semicolon, per existing usage.
2004-11-10 Ziemowit Laski <zlaski@apple.com>
Radar 3761423
* typeck.c (finish_class_member_access_expr): Insert call to
objc_is_public() to check ObjC ivar access.
2004-11-08 Ziemowit Laski <zlaski@apple.com>
Radar 3869280
* tree.c (lvalue_p_1): Determine lvalue-ness of CONST_DECLs the same
way as for VAR_DECLs.
2004-11-03 Ziemowit Laski <zlaski@apple.com>
Radar 3863563 (fix from mainline)
* cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
(LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
* cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
from cp-lang.c.
* cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
from cp-lang.c.
(LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
2004-11-01 Ziemowit Laski <zlaski@apple.com>
Radar 2810013
* parser.c (cp_parser_primary_expression): Perform instace variable
lookup in conjunction with C++ identifier expression lookup.
(cp_parser_postfix_expression): Moved instance variable lookup
to cp_parser_primary_expression().
2004-10-21 Ziemowit Laski <zlaski@apple.com>
Radar 3540965
* parser.c (cp_parser_postfix_expression): Do not forget to parse
the rhs of a postfix expression when the lhs is an instance variable.
2004-10-18 Robert Bowdidge <bowdidge@apple.com>
Radar 3843618
* gcc/cp/parser.c: Bring the change for PR/17829 over from mainline
so that Finder_FE will build again.
2004-10-13 Ziemowit Laski <zlaski@apple.com>
Radar 3677258
* cp-tree.h (struct lang_identifier): Add 'interface_value' field.
2004-09-14 Andrew Pinski <apinski@apple.com>
Rest of Radar 3753405
* cp-tree.h (enum cp_decl_sepcs): Add ds_cw_asm.
* decl.c (grokdeclarator): Rename cw_asm_specbit to cw_asm_p to mirror
the other specbits.
Access specbits for cw_asm.
Add "asm" to decl_specs_names.
Remove MERGE FIXME comment.
* parser.c (cp_parser_decl_specifier_seq, <case RID_ASM>): Mirror the
other decl spec bits.
2004-08-22 Andrew Pinski <apinski@apple.com>
Revert:
2004-08-22 Andrew Pinski <apinski@apple.com>
PR c++/14029
* typeck.c (build_unary_op): Use &a.b if the foldded lowered
expression is not constant.
2004-08-22 Andrew Pinski <apinski@apple.com>
PR c++/14029
* typeck.c (build_unary_op): Use &a.b if the foldded lowered
expression is not constant.
2004-08-10 Devang Patel <dpatel@apple.com>
Remove Symbol Separation.
Radar 3555440. Reviewed by Mike Stump.
* decl2.c (finish_file): Do not write context.
2004-08-08 Andrew Pinski <apinski@apple.com>
* cp/lex.c (cxx_init): Remove APPLE LOCAL for setting -gused
by default as it is handled in CC1_SPECs now.
2004-08-03 Stan Shebs <shebs@apple.com>
Support for CodeWarrior-style assembly language blocks and
functions. Radar 3368707.
* cp-tree.h (cw_asm_cp_build_component_ref): Declare.
* decl.c (grokdeclarator): Recognize asm keyword, set flag
on function decl if seen.
* parser.c (cp_lexer_get_preprocessor_token): Allow @-tokens
if doing asm.
(cp_parser_primary_expression): Recognize @-tokens in asm,
replace with @-identifier (which will become a label) later.
(cp_parser_unary_expression): Call asm-specific postfix
expression handler.
(cp_parser_compound_statement): Handle asm compound statements
specially.
(cp_parser_statement_seq_opt): Handle statement sequences in
asm blocks specially.
(cp_parser_simple_declaration): Leave instead of erroring out
if apparent asm opcode is seen.
(cp_parser_decl_specifier_seq,
cp_parser_storage_class_specifier_opt): Accept RID_ASM as a specifier.
(cp_parser_asm_definition): Detect asm blocks and handle.
(cp_parser_cw_asm_compound_statement,
cp_parser_cw_asm_declaration_seq_opt, cp_parser_cw_asm_line_seq_opt,
cp_parser_cw_asm_line, cp_parser_cw_asm_statement_seq_opt,
cp_parser_cw_asm_statement, cp_parser_cw_asm_operands,
cp_parser_cw_asm_operand, cp_parser_cw_asm_postfix_expression,
cw_asm_typename_or_reserved): New functions.
semantics.c (finish_id_expression): Handle register names
and labels in asm blocks specially.
* typeck.c (cw_asm_cp_build_component_ref): New function.
2004-08-01 Devang Patel <dpatel@apple.com>
Re-implement -fwritable-strings support.
Radar : 3699482
* decl.c (cxx_init_decl_processing): Check flag_writable_strings.
2004-08-01 Geoffrey Keating <geoffk@apple.com>
* decl.c (grokdeclarator): Don't call warn_about_long_double.
2004-06-08 Fariborz Jahanian <fjahanian@apple.com>
* decl2.c (maybe_emit_vtables, get_guard):
Remove all APPLE LOCAL coalescing codes.
(import_export_decl): Remove all APPLE LOCAL coalescing codes,
except for one call to comdat_linkage.
2004-06-08 Fariborz Jahanian <fjahanian@apple.com>
* decl2.c (maybe_emit_vtables, import_export_decl, get_guard):
Resore various APPLE LOCAL coalescing codes.
2004-06-07 Fariborz Jahanian <fjahanian@apple.com>
* decl2.c (maybe_emit_vtables, import_export_decl, get_guard):
Remove various APPLE LOCAL coalescing codes.
2004-04-02 Ziemowit Laski <zlaski@apple.com>
Remove APPLE LOCAL AltiVec code whenever possible; merge in
AltiVec/VECTOR_TYPE-handling code from mainline.