Jakub Jelinek
288d6a77c3
sarray.c (sarray_free): Use old_buckets variable.
...
* sarray.c (sarray_free): Use old_buckets variable.
* encoding.c (objc_layout_structure_next_member): Remove unused
bfld_type_size variable.
* decContext.c (decContextTestEndian): Move adj definition into
#if DECCHECK guarded code.
From-SVN: r154730
2009-11-28 21:31:39 +01:00
Jakub Jelinek
748086b7b2
Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.
...
From-SVN: r145841
2009-04-09 17:00:19 +02:00
Alan Modra
dd25a747c9
Delete get_inner_array_type. Use strip_array_types instead.
...
From-SVN: r135858
2008-05-25 13:28:15 +09:30
Geoffrey Keating
58182de357
In gcc/: PR 23067
...
In gcc/:
PR 23067
* c-decl.c (start_struct): Don't create self-containing
structures.
* config/rs6000/rs6000.c (darwin_rs6000_special_round_type_align):
New.
* config/rs6000/rs6000-protos.h
(darwin_rs6000_special_round_type_align): New.
* config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Rewrite.
(ROUND_TYPE_ALIGN): Use darwin_rs6000_special_round_type_align.
In gcc/testsuite/:
PR 23067
* gcc.target/powerpc/darwin-abi-3.c: Remove XFAIL.
* gcc.target/powerpc/darwin-abi-6.c: Remove XFAIL.
* gcc.target/powerpc/darwin-abi-7.c: Remove XFAIL.
* gcc.target/powerpc/darwin-abi-8.c: Remove XFAIL.
* gcc.target/powerpc/darwin-abi-9.c: Remove XFAIL.
* gcc.target/powerpc/darwin-abi-10.c: Remove XFAIL.
* gcc.target/powerpc/darwin-abi-11.c: Remove XFAIL.
In libobjc/:
* encoding.c (darwin_rs6000_special_round_type_align): New.
In libffi/:
* src/powerpc/ffi_darwin.c (darwin_adjust_aggregate_sizes): New.
(ffi_prep_cif_machdep): Call darwin_adjust_aggregate_sizes for
Darwin.
* testsuite/libffi.call/nested_struct4.c: Remove Darwin XFAIL.
* testsuite/libffi.call/nested_struct6.c: Remove Darwin XFAIL.
From-SVN: r118365
2006-11-01 05:28:41 +00: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
761c0d29cb
re PR libobjc/25354 (There should be an automated testsuite for objc_sizeof_type and objc_alignof_type)
...
2005-12-12 Andrew Pinski <pinskia@physics.uc.edu>
PR libobjc/25354
* objc.dg/gnu-encoding: New directory.
* objc.dg/gnu-encoding/compat-common.h: New file.
* objc.dg/gnu-encoding/struct-layout-1.h: New file.
* objc.dg/gnu-encoding/struct-layout-1_test.h: New file.
* objc.dg/gnu-encoding/vector-defs.h: New file.
* objc.dg/gnu-encoding/gnu-encoding.exp: New file.
* objc.dg/gnu-encoding/generate-random.c: New file.
* objc.dg/gnu-encoding/generate-random_r.c: New file.
* objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c: New file.
* objc.dg/gnu-encoding/generate-random.h: New file.
2005-12-12 Andrew Pinski <pinskia@physics.uc.edu>
* encoding.c (TYPE_FIELDS): Fix to skip over just _C_STRUCT_B and the name.
(get_inner_array_type): Fix to skip over _C_ARY_B and size.
(rs6000_special_round_type_align): Update for the ABI fix.
(objc_layout_finish_structure): Correct the encoding which is passed to
ROUND_TYPE_ALIGN.
From-SVN: r108398
2005-12-11 21:47:52 -08:00
Andrew Pinski
4540a3ade1
re PR libobjc/25347 (objc_alignof_type gets the wrong alignment for unions (objc_sizeof_type is wrong also too))
...
2005-12-11 Andrew Pinski <pinskia@physics.uc.edu>
PR libobjc/25347
* encoding.c (objc_sizeof_type): Don't handle _C_UNION_B special
but use the struct layout functions.
(objc_alignof_type): Likewise.
(objc_layout_structure): Handle _C_UNION_B also.
(objc_layout_structure_next_member): Likewise.
(objc_layout_finish_structure): Likewise.
2005-12-11 Andrew Pinski <pinskia@physics.uc.edu>
PR libobjc/25347
* objc.dg/encode-8.m: New test.
From-SVN: r108379
2005-12-10 22:59:12 -08:00
Andrew Pinski
153b4898d2
re PR libobjc/25346 (objc_sizeof_type does not handle _Bool at all)
...
2005-12-11 Andrew Pinski <pinskia@physics.uc.edu>
PR libobjc/25346
* objc/objc-api.h (_C_BOOL): New define.
* encoding.c (objc_sizeof_type): Handle _C_BOOL.
(objc_alignof_type): Likewise.
(objc_skip_typespec): Likewise.
2005-12-11 Andrew Pinski <pinskia@physics.uc.edu>
PR libobjc/25346
* objc.dg/encode-7.m: New test.
From-SVN: r108378
2005-12-10 22:28:35 -08:00
Kelley Cook
f9d09c4359
All files: Update FSF address.
...
2005-08-17 Kelley Cook <kcook@gcc.gnu.org>
* All files: Update FSF address.
From-SVN: r103197
2005-08-17 03:21:42 +00:00
David Ayers
348a344520
archive.c, [...]: Include hash.h.
...
2005-06-07 David Ayers <d.ayers@inode.at>
* archive.c, init.c, selector.c: Include hash.h.
* archive.c, class.c, encoding.c, gc.c, hash.c, hash_compat.c,
init.c, misc.c, nil_method.c, objects.c, sarray.c, selector.c,
sendmsg.c, thr-dce.c, thr-decosf1.c, thr-irix.c, thr-mach.c,
thr-objc.c, thr-os2.c, thr-posix.c, thr-pthreads.c, thr-rtems.c,
thr-single.c, thr-solaris.c, thr-vxworks.c, thr-win32.c, thr.c:
Include Objective-C headers with quotes and objc/ directory
prefix.
From-SVN: r100723
2005-06-07 21:04:19 +00:00
Andrew Pinski
45f1796923
encoding.c (ALTIVEC_VECTOR_MODE): Define a bogus macro.
...
2004-09-16 Andrew Pinski <apinski@apple.com>
* encoding.c (ALTIVEC_VECTOR_MODE): Define a bogus macro.
From-SVN: r87591
2004-09-16 01:35:01 -07:00
Zack Weinberg
0cf614012f
cp-demangle.h: Declare cplus_demangle_operators...
...
libiberty:
* cp-demangle.h: Declare cplus_demangle_operators,
cplus_demangle_builtin_types, cplus_demangle_mangled_name, and
cplus_demangle_type as static if IN_GLIBCPP_V3.
libobjc:
* encoding.c: Rename target_flags with a #define to avoid
conflict with a prior declaration.
From-SVN: r83800
2004-06-28 17:52:45 +00:00
Nick Clifton
e7ebc32a80
* encoding.c (BITS_PER_UNIT): Define if a definition is not provided.
...
From-SVN: r83438
2004-06-21 16:39:21 +00:00
Andrew Pinski
435317e25c
[multiple changes]
...
2004-05-25 Andrew Pinski <pinskia@physics.uc.edu>
Merge from the libobjc-branch
2004-02-09 Andrew Pinski <pinskia@physics.uc.edu>
* Makefile.in (OBJC_H): Change objc-deps.h to objc-decls.h.
2004-02-03 Andrew Pinski <pinskia@physics.uc.edu>
* Makefile.in (OBJC_H): Add objc-deps.h.
2004-01-27 Nicola Pero <n.pero@mi.flashnet.it>
* Protocol.m ([-conformsTo:]): If the argument is nil, return NO.
([-hash], [-isEqual:]): New methods.
2004-01-27 Richard Frith-Macdonald <rfm@gnu.org>
* sarray.c (sarray_free): Add a better comment.
2004-01-27 Adam Fedor <fedor@gnu.org>
* hash.c (hash_add): Cast cachep to int.
* selector.c (__sel_register_typed_name): Cast
soffset_decode to int.
2004-01-27 Alexander Malmberg <alexander@malmberg.org>
* selector.c: Rename register_selectors_from_list to
__objc_register_selectors_from_list. Update caller.
(__objc_register_selectors_from_list): Lock __objc_runtime_mutex
while registering selectors. Use __sel_register_typed_name instead
of sel_register_typed_name. Check for NULL method_name:s.
(pool_alloc_selector): New function.
(__sel_register_typed_name): Use pool_alloc_selector to allocate
selector structures.
* sendmsg.c (class_add_method_list): Use
__objc_register_selectors_from_list.
* objc/runtime.h: Add __objc_register_selectors_from_list.
2004-01-25 Adam Fedor <fedor@gnu.org>
Nicola Pero <n.pero@mi.flashnet.it>
Andrew Pinski <pinskia@physics.uc.edu>
* objc/objc-decls.h: New file.
* objc/objc-api.h (_objc_lookup_class): Mark as export.
(_objc_load_callback): Likewise.
(_objc_object_alloc): Likewise.
(_objc_object_copy): Likewise.
(_objc_object_dispose): Likewise.
2004-01-25 Andrew Pinski <pinskia@physics.uc.edu>
* archive.c: s/__inline__/inline
* sendmsg.c: Likewise.
* encoding.c: Remove FIXME about the warning
about unused variable.
* sendmsg.c: Add a FIXME comment saying that
this should be using libffi.
* Makefile.in (LIBTOOL): Use @LIBTOOL@ now as it works.
From-SVN: r82253
2004-05-25 12:10:54 -07:00
Andrew Pinski
95727fb877
re PR target/10781 (wrong class size and alignment with static class member)
...
2004-01-17 Andrew Pinski <pinskia@physics.uc.edu>
PR target/10781
* config/rs6000/rs6000-protos.h (rs6000_special_round_type_align):
Prototype.
* config/rs6000/rs6000.c (rs6000_special_round_type_align):
New function.
* config/rs6000/linux64.h (ROUND_TYPE_ALIGN): Use it.
* config/rs6000/aix.h (ROUND_TYPE_ALIGN): Likewise.
* config/rs6000/darwin.h (ROUND_TYPE_ALIGN): Likewise.
2004-01-17 Andrew Pinski <pinskia@physics.uc.edu>
PR target/10781
* encoding.c (rs6000_special_round_type_align): Define.
From-SVN: r76043
2004-01-17 11:48:50 -08:00
Nathanael Nerode
6c82ad2561
Makefile.in, [...]: Replace "GNU CC" with "GCC".
...
2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
* Makefile.in, NXConstStr.m, Object.m, Protocol.m, archive.c,
class.c, encoding.c, gc.c, objc/NXConstStr.h, objc/Object.h,
objc/Protocol.h, objc/encoding.h, objc/hash.h, objc/objc-api.h,
objc/objc-list.h, objc/objc.h, ocjc/runtime.h, objc/sarray.h,
objc/thr.h, objc/typedstream.h: Replace "GNU CC" with "GCC".
From-SVN: r67131
2003-05-23 20:04:58 +00:00
Zack Weinberg
4977bab6ed
Merge basic-improvements-branch to trunk
...
From-SVN: r60174
2002-12-16 18:23:00 +00:00
Rodney Brown
40165636b5
encoding.h: Fix formatting.
...
2002-07-02 Rodney Brown <rbrown64@csc.com.au>
* objc/encoding.h: Fix formatting.
* objc/hash.h: Likewise.
* objc/objc-api.h: Likewise.
* objc/runtime.h: Likewise.
* objc/thr.h: Likewise.
* archive.c: Likewise.
* class.c: Likewise.
* encoding.c: Likewise.
* gc.c: Likewise.
* hash.c: Likewise.
* init.c: Likewise.
* misc.c: Likewise.
* nil_method.c: Likewise.
* objects.c: Likewise.
* sarray.c: Likewise.
* selector.c: Likewise.
* sendmsg.c: Likewise.
* thr-mach.c: Likewise.
* thr.c: Likewise.
From-SVN: r55190
2002-07-02 19:43:03 +00:00
Kaveh R. Ghazi
b62cc13a20
Object.m (forward, [...]): Fix unused parameter warnings.
...
* Object.m (forward, read, write): Fix unused parameter warnings.
* encoding.c: Include <stdlib.h>.
(target_flags): Mark with attribute unused.
(atoi): Delete.
* runtime.h (__objc_selector_max_index): Change to unsigned int.
(__objc_generate_gc_type_description): Prototype.
* selector.c (__objc_selector_max_index): Change to unsigned int.
From-SVN: r54884
2002-06-21 14:36:37 +00:00
Kaveh R. Ghazi
8f8c44cb4f
Object.m: Fix signed/unsigned warning.
...
* Object.m: Fix signed/unsigned warning.
* Protocol.m: Likewise.
* archive.c: Always include stdlib.h.
(objc_read_short, objc_read_unsigned_short, objc_read_int,
objc_read_long, __objc_read_nbyte_uint, __objc_read_nbyte_ulong):
Fix signed/unsigned warning.
(objc_write_type, objc_read_type, objc_write_types,
objc_read_types): Ensure ctype 8-bit safety.
(__objc_no_write, __objc_no_read): Mark unused parameters.
* class.c (class_table_setup): Specify void arg.
* encoding.c (atoi, objc_sizeof_type, objc_alignof_type,
objc_skip_typespec, objc_skip_offset,
objc_layout_structure_next_member): Ensure ctype 8-bit safety.
(objc_layout_structure_next_member): Ensure variables are
initialized.
* gc.c (__objc_generate_gc_type_description,
class_ivar_set_gcinvisible): Mark unused parameters.
* init.c (__objc_send_load, __objc_destroy_class_tree_node): Mark
unused parameters.
(__objc_init_protocols) Fix signed/unsigned warning.
* nil_method.c (nil_method): Mark unused parameters.
* thr.h (objc_thread_callback): Specify void arg.
* sarray.c (sarray_new, sarray_realloc, sarray_free): Fix
signed/unsigned warning.
(sarray_free): Fix formatting.
* selector.c (sel_types_match): Ensure ctype 8-bit safety.
* sendmsg.c (__objc_init_install_dtable) Mark unused parameters.
From-SVN: r54649
2002-06-15 17:50:14 +00:00
Andreas Jaeger
42bac11688
encoding.c (objc_layout_structure_next_member): Remove unused variable.
...
* encoding.c (objc_layout_structure_next_member): Remove unused
variable.
From-SVN: r54406
2002-06-09 18:46:01 +02:00
David O'Brien
d0d091ae08
encoding.c (MAX, [...]): #undef before defining.
...
2002-04-19 David O'Brien <obrien@FreeBSD.org>
* encoding.c (MAX, MIN, ROUNDING): #undef before defining.
Approved by: David S. Miller <davem@redhat.com>
Message-Id: <20020419.184825.67430590.davem@redhat.com>
From-SVN: r52648
2002-04-23 02:04:20 +00:00
Aldy Hernandez
d5114db12a
encoding.c: Add target_flags.
...
2001-11-14 Aldy Hernandez <aldyh@redhat.com>
* encoding.c: Add target_flags.
From-SVN: r47021
2001-11-14 21:11:43 +00:00
Aldy Hernandez
f4fdaedae3
objc-api.h (_C_VECTOR): New.
...
2001-11-07 Aldy Hernandez <aldyh@redhat.com>
* objc-api.h (_C_VECTOR): New.
* encoding.c (VECTOR_TYPE): New.
From-SVN: r46849
2001-11-08 18:51:27 +00:00
John Wehle
49073def1b
* encoding.c (REAL_TYPE): Define.
...
From-SVN: r40687
2001-03-21 09:46:20 +00:00
David Edelsohn
120d59bfb9
* encoding.c (TYPE_MODE): Define.
...
From-SVN: r40633
2001-03-19 16:05:03 -05:00
Richard Earnshaw
919ee051d3
encoding.c (STRUCTURE_SIZE_BOUNDARY): Redefine in a way that determines the value dynamically.
...
* encoding.c (STRUCTURE_SIZE_BOUNDARY): Redefine in a way that
determines the value dynamically.
From-SVN: r38906
2001-01-11 14:01:45 +00:00
Mark Mitchell
ae499ccea4
Move statement-tree facilities from C++ to C front-end.
...
* c-common.h (c_tree_index): Add CTI_VOID_ZERO.
(void_zero_node): New macro.
(struct stmt_tree_s): New type.
(stmt_tree): New typedef.
(struct language_function): New type.
(last_tree): New macro.
(last_expr_type): Likewise.
(walk_tree_fn): New typedef.
(current_stmt_tree): New function.
(begin_stmt_tree): Likewise.
(add_stmt): Likewise.
(finish_stmt_tree): Likewise.
(statement_code_p): Likewise.
(lang_statement_code_p): New variable.
(walk_stmt_tree): New function.
(STMT_IS_FULL_EXPR_P): New macro.
* c-common.c (lang_statement_code_p): New variable.
(c_common_nodes_and_builtins): Initialize void_zero_node.
(statement_code_p): New function.
(walk_stmt_tree): Likewise.
* c-decl.c (language_function): Rename to ...
(c_language_function): ... this. Include language_function.
(push_c_function_context): Adjust accordingly.
(pop_c_function_context): Likewise.
(mark_c_function_context): Likewise.
(current_stmt_tree): Define.
* c-semantics.c (begin_stmt_tree): New function.
(add_stmt): Likewise.
(prune_unused_decls): Likewise.
(finish_stmt_tree): Likewise.
Move statement-tree facilities from C++ to C front-end.
* cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
(void_zero_node): Remove.
(stmt_tree): Likewise.
(scope_chain): Adjust.
(language_function): Rename to cp_language_function.
(cp_function_chain): Adjust.
(current_stmt_tree): Remove.
(last_tree): Likewise.
(last_expr_type): Likewise.
(struct lang_decl): Adjust.
(STMT_IS_FULL_EXPR_P): Remove.
(add_tree): Remove.
(begin_stmt_tree): Likewise.
(finish_stmt_tree): Likewise.
(walk_tree_fn): Likewise.
(walk_stmt_tree): Likewise.
* class.c (finish_struct): Replace use of add_tree with add_stmt.
* decl.c (mark_stmt_tree): Adjust type.
(init_decl_processing): Don't build void_zero_node.
(initialize_local_var): Adjust usage of current_stmt_tree.
(finish_enum): Use add_stmt, not add_tree.
(save_function_data): Adjust use of language_function.
(finish_constructor_body): Use add_stmt, not add_tree.
(finish_destructor_body): Likewise.
(push_cp_function_context): Adjust use of language_function.
(pop_cp_function_context): Likewise.
(mark_lang_function): Likewise.
(mark_cp_function_context): Likewise.
* init.c (build_aggr_init): Adjust use of current_stmt_tree.
(build_vec_init): Likewise.
* semantics.c (SET_LAST_STMT): Remove.
(RECHAIN_STMTS): Don't use it.
(stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
(current_stmt_tree): Define.
(add_tree): Remove.
(finish_goto_stmt): Use add_stmt, not add_tree.
(finish_expr_stmt): Likewise.
(begin_if_stmt): Likewise.
(finish_then_clause): Likewise.
(begin_while_stmt): Likewise.
(begin_do_stmt): Likewise.
(finish_return_stmt): Likewise.
(begin_for_stmt): Likewise.
(finish_break_stmt): Likewise.
(finish_continue_stmt): Likewise.
(begin_switch_stmt): Likewise.
(finish_case_label): Likewise.
(begin_try_block): Likewise.
(begin_function_try_block): Likewise.
(begin_handler): Likewise.
(begin_catch_block): Likewise.
(begin_compound_stmt): Likewise.
(begin_asm_stmt): Likewise.
(finish_asm_stmt): Likewise.
(finish_label_stmt): Likewise.
(add_decl_stmt): Likewise.
(finish_subobject): Likewise.
(finish_decl_cleanup): Likewise.
(finish_named_return_value): Likewise.
(setup_vtbl_ptr): Likewise.
(add_scope_stmt): Likewise.
(finish_stmt_expr): Likewise.
(prune_unused_decls): Remove.
(begin_stmt_tree): Likewise.
(finish_stmt_tree): Likewise.
(prep_stmt): Adjust use of current_stmt_tree.
(lang_expand_stmt): Likewise.
* tree.c (statement_code_p): Remove.
(cp_statement_code_p): New function.
(walk_stmt_tree): Remove.
(init_tree): Set lang_statement_code_p.
From-SVN: r36221
2000-09-07 01:36:11 +00:00
Jakub Jelinek
35f1099824
encoding.c (objc_layout_structure_next_member): Do the whole procedure even for the first member, so that we get correct alignment.
...
* encoding.c (objc_layout_structure_next_member): Do the whole
procedure even for the first member, so that we get correct
alignment.
From-SVN: r33110
2000-04-12 17:55:54 +02:00
Jakub Jelinek
bcdb110625
objc-act.c: Include ggc.h.
...
* objc/objc-act.c: Include ggc.h.
(objc_tree_index, objc_global_trees): Convert most of the
static tree variables into a static array with previous names
as defines.
(objc_ellipsis_node): New variable.
(lang_init): Call objc_act_parse_init and c_parse_init.
Create objc_ellipsis_node.
(build_selector_translation_table): Use objc_ellipsis_node instead
of (tree)1.
(hack_method_prototype): Likewise.
(get_arg_type_list): Likewise.
(start_method_def): Likewise.
(continue_method_def): Likewise.
(gen_method_decl): Likewise.
(ggc_mark_imp_list): New function.
(ggc_mark_hash_table): New function.
(objc_act_parse_init): New function.
* objc/objc-act.h (objc_ellipsis_node): Add extern variable.
* c-parse.in (c_parse_init): For objc add roots of objc specific
local tree variables.
* objc/objc-parse.y: Rebuilt.
* objc/objc-parse.c: Rebuilt.
(opt_parm_list): Use objc_ellipsis_node instead of (tree)1.
* Object.m (strlen): Provide prototype on all 64bit platforms,
not only alpha.
* sarray.c (memcpy): Likewise.
* encoding.c (objc_layout_finish_structure): Don't use
ROUND_TYPE_ALIGN on sparc.
From-SVN: r33092
2000-04-12 09:22:32 +02:00
Ovidiu Predescu
befb6d14df
Minor changes in the documentation. Correctly define get_inner_array_type.
...
From-SVN: r23144
1998-10-16 22:19:22 +00:00
Richard Frith-Macdonald
1df287f8fb
encoding.c (objc_skip_type_qualifiers): Handle _C_BYREF.
...
* encoding.c (objc_skip_type_qualifiers): Handle _C_BYREF.
(objc_get_type_qualifiers): Similarly.
* objc/encoding.h (_C_BYREF): Define.
(_F_BYREF): Define.
From-SVN: r22917
1998-10-08 05:23:35 -06:00
Ovidiu Predescu
2e5f02a3e3
encoding.c (TREE_TYPE, ARRAY_TYPE): Define.
...
* encoding.c (TREE_TYPE, ARRAY_TYPE): Define.
(get_inner_array_type): Define.
From-SVN: r22536
1998-09-21 16:28:51 -06:00
Ben Elliston
88e17b57eb
1998-09-21 Ben Elliston <bje@cygnus.com>
...
* New directory. Moved files from ../gcc/objc.
From-SVN: r22514
1998-09-21 11:22:07 +10:00