Age | Commit message (Collapse) | Author | Files | Lines |
|
* c-parser.c (c_parser_for_statement): Initialize
collection_expression.
From-SVN: r169033
|
|
In gcc/:
2011-01-12 Nicola Pero <nicola.pero@meta-innovation.com>
* c-parser.c (c_parser_objc_at_property_declaration): Improved
error message.
2011-01-12 Nicola Pero <nicola.pero@meta-innovation.com>
* c-parser.c (c_lex_one_token): Updated and reindented some
comments. No changes in code.
In gcc/cp/:
2011-01-12 Nicola Pero <nicola.pero@meta-innovation.com>
* parser.c (cp_parser_objc_at_property_declaration): Improved
error message.
In gcc/testsuite/:
2011-01-12 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/property/at-property-29.m: New.
* obj-c++.dg/property/at-property-29.mm: New.
From-SVN: r168698
|
|
In gcc/:
2011-01-09 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/47232
* c-parser.c (c_parser_declaration_or_fndef): Improved
error message.
In gcc/testsuite/:
2011-01-09 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/47232
* objc.dg/attributes/invalid-attribute-1.m: New.
* obj-c++.dg/attributes/invalid-attribute-1.mm: New.
From-SVN: r168619
|
|
In gcc/:
2011-01-08 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/47078
* c-parser.c (c_parser_objc_type_name): If the type is unknown,
for error recovery purposes behave as if it was not specified so
that the default type is usd.
In gcc/testsuite/:
2011-01-08 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/47078
* objc.dg/invalid-method-2.m: New.
* obj-c++.dg/invalid-method-2.mm: New.
In gcc/cp/:
2011-01-08 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/47078
* parser.c (cp_parser_objc_typename): If the type is unknown, for
error recovery purposes behave as if it was not specified so that
the default type is used.
From-SVN: r168601
|
|
c_finish_omp_atomic.
gcc
* c-parser.c (c_parser_omp_atomic): Pass location of assignment
operator to c_finish_omp_atomic.
* c-typeck.c (lvalue_or_else): Add 'loc' argument.
(build_unary_op): Update.
(build_modify_expr): Update.
(build_asm_expr): Update.
gcc/cp
* typeck.c (cp_build_addr_expr_1): Update call to lvalue_error.
(lvalue_or_else): Likewise.
gcc/c-family
* c-common.h (lvalue_error): Update.
* c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
not error.
From-SVN: r168514
|
|
In gcc/:
2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
* c-parser.c (c_parser_objc_try_catch_finally_statement): Call
objc_maybe_warn_exceptions.
(c_parser_objc_synchronized_statement): Call
objc_maybe_warn_exceptions.
In gcc/cp/:
2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
* parser.c (cp_parser_objc_try_catch_finally_statement): Call
objc_maybe_warn_exceptions.
(cp_parser_objc_synchronized_statement): Same change.
In gcc/c-family/:
2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
* c-objc.h (objc_maybe_warn_exceptions): New.
* stub-objc.c (objc_maybe_warn_exceptions): New.
In gcc/objc/:
2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_init): Call using_eh_for_cleanups.
(objc_init_exceptions): Renamed to objc_maybe_warn_exceptions. Do
not call using_eh_for_cleanups.
(objc_begin_try_stmt): Do not call objc_init_exceptions.
(objc_build_throw_stmt): Updated call to
objc_maybe_warn_exceptions.
In gcc/testsuite/:
2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/fobjc-exceptions-1.m: Updated.
* objc.dg/fobjc-exceptions-2.m: New.
* objc.dg/fobjc-exceptions-3.m: New.
* obj-c++.dg/fobjc-exceptions-1.mm: New.
* obj-c++.dg/fobjc-exceptions-2.mm: New.
* obj-c++.dg/fobjc-exceptions-3.mm: New.
From-SVN: r168032
|
|
gcc:
2010-12-17 Paolo Bonzini <bonzini@gnu.org>
PR c/20385
* function.c (used_types_insert): Handle ERROR_MARK.
* c-decl.c (grokdeclarator): Handle ERROR_MARK.
(declspecs_add_type): Leave error_mark_node in specs->type.
(finish_declspecs): Change it to integer_type_node here.
* c-parser.c (c_parser_peek_2nd_token): Move earlier.
(enum c_lookahead_kind): New.
(c_parser_next_token_starts_typename): New name of
c_parser_next_tokens_start_typename. Accept lookahead enum
and handle it here instead of...
(c_parser_next_tokens_start_declaration): ... here. Call it.
(c_parser_declspecs): Accept another argument. Do not exit
on C_ID_ID if it is guessed to be an unknown typename.
(c_parser_parms_declarator): Use 2nd token to distinguish a K&R
declaration from an ANSI declaration starting with an unknown
typename.
(c_parser_struct_declaration, c_parser_objc_type_name,
c_parser_typeof_specifier, c_parser_declarator,
c_parser_direct_declarator_inner): Adjust calls.
(c_parser_parameter_declaration): Likewise.
(c_parser_type_name): Pass back an error_mark_node to the caller.
(c_parser_postfix_expression): Do error recovery when
c_parser_type_name returns NULL.
testsuite:
2010-12-17 Paolo Bonzini <bonzini@gnu.org>
PR c/20385
* objc.dg/tls/init-2.m: Adjust.
* gcc.dg/noncompile/920923-1.c: Adjust.
* gcc.dg/noncompile/pr44517.c: Adjust.
* gcc.dg/declspec-18.c: New test.
From-SVN: r167999
|
|
In gcc/:
2010-12-10 Nicola Pero <nicola.pero@meta-innovation.com>
* c-parser.c (c_parser_objc_class_definition): Recognize
Objective-C 2.0 class extensions.
In gcc/cp/:
2010-12-10 Nicola Pero <nicola.pero@meta-innovation.com>
* parser.c (cp_parser_objc_superclass_or_category): Recognize
Objective-C 2.0 class extensions. Added iface_p and
is_class_extension arguments.
(cp_parser_objc_class_interface): Updated call to
cp_parser_objc_superclass_or_category.
(cp_parser_objc_class_implementation): Same change.
In gcc/objc/:
2010-12-10 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_in_class_extension): New.
(objc_start_category_interface): If -fobjc-std=objc1
was specified, produce an error if a class extension is used.
(objc_finish_interface): Reset objc_in_class_extension to false.
(objc_add_property_declaration): Allow a class extension to extend
readonly properties in the main @interface to be readwrite.
(start_class): Added code to deal with class extensions. In that
case, return the existing interface after adding any additional
protocols to it and setting objc_in_class_extension to true.
(continue_class): If in a class extension, do not generate the
instance variable template.
In gcc/testsuite/:
2010-12-10 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/class-extension-1.m: New.
* objc.dg/class-extension-2.m: New.
* objc.dg/class-extension-3.m: New.
* objc.dg/property/at-property-26.m: New.
* objc.dg/property/at-property-27.m: New.
* objc.dg/property/at-property-28.m: New.
* obj-c++.dg/class-extension-1.mm: New.
* obj-c++.dg/class-extension-2.mm: New.
* obj-c++.dg/class-extension-3.mm: New.
* obj-c++.dg/property/at-property-26.mm: New.
* obj-c++.dg/property/at-property-27.mm: New.
* obj-c++.dg/property/at-property-28.mm: New.
From-SVN: r167680
|
|
In gcc/:
2010-12-07 Nicola Pero <nicola.pero@meta-innovation.com>
* c-parser.c (c_parser_typeof_specifier): Removed special
treatment of objc_volatilized attribute for Objective-C.
From-SVN: r167526
|
|
In gcc/:
2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
* c-parser.c (c_parser_for_statement): Use c_fully_fold() instead
of c_process_expr_stmt() for the iterating and collection
expressions of an Objective-C fast enumeration loop.
In gcc/objc/:
2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_finish_foreach_loop): Mark the
object_expression as used.
In gcc/testsuite/:
2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/foreach-8.m: New.
From-SVN: r167518
|
|
In gcc/:
2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
* c-family/c-common.h: Removed the declarations of all the objc_
callbacks, and moved them into c-objc.h. Removed
objc_ivar_visibility_kind and moved it into c-objc.h.
* c-family/c-objc.h: New file.
* c-family/c-common.c: Include c-objc.h.
* c-family/c-format.c: Same change.
* c-family/stub-objc.c: Same change.
* c-decl.c: Include c-family/c-objc.h.
* c-parser.c: Same change.
* c-typeck.c: Same change.
* c-config-lang.in (gtfiles): Added c-family/c-objc.h.
* Makefile.in (c-decl.o): Depend on c-family/c-objc.h.
(c-parser.o): same change.
(c-typeck.o): Same change.
(c-family/c-format.o): Same change.
(c-family/stub-objc.o): Same change.
(c-family/c-common.o): Same change.
(PLUGIN_HEADERS): Added c-family/c-objc.h.
In gcc/cp/:
2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
* call.c: Include c-family/c-objc.h.
* decl.c: Same change.
* decl2.c: Same change.
* error.c: Same change.
* lex.c: Same change.
* parser.c: Same change.
* pt.c: Same change.
* semantics.c: Same change.
* typeck.c: Same change.
* Make-lang.in (cp/decl.o): Depend on c-family/c-objc.h.
(cp/decl2.o): Same change.
(cp/call.o): Same change.
(cp/error.o): Same change.
(cp/lex.o): Same change.
(cp/parser.o): Same change.
(cp/pt.o): Same change.
(cp/semantics.o): Same change.
(cp/typeck.o): Same change.
* config-lang.in (gtfiles): Added c-family/c-objc.h.
In gcc/objc/:
2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c: Include c-family/c-objc.h.
* objc-lang.c: Same change.
* Make-lang.in (objc/objc-act.o): Depend on
c-family/c-objc.h.
(objc/objc-lang.o): Same change.
* config-lang.in (gtfiles): Added c-family/c-objc.h.
In gcc/objcp/:
2010-12-06 Nicola Pero <nicola.pero@meta-innovation.com>
* config-lang.in (gtfiles): Added c-family/c-objc.h.
* Make-lang.in (objcp/objcp-act.o): Depend on
c-family/c-objc.h.
(objcp/objcp-lang.o): Same change.
(objcp/objcp-decl.o): Same change.
* objcp-lang.c: Include c-family/c-objc.h.
* objcp-decl.c: Same change.
From-SVN: r167481
|
|
* diagnostic-core.h: Include bversion.h.
* toplev.h: Don't include input.h or bversion.h.
(parse_optimize_options): Don't declare here.
* alias.c, auto-inc-dec.c, c-aux-info.c, c-convert.c, c-parser.c,
caller-save.c, cfg.c, cfganal.c, cfgbuild.c, cfgcleanup.c,
combine-stack-adj.c, config/arm/pe.c, config/darwin-c.c,
config/host-darwin.c, config/i386/host-cygwin.c,
config/i386/host-mingw32.c, config/i386/msformat-c.c,
config/i386/netware.c, config/i386/nwld.c,
config/i386/winnt-cxx.c, config/i386/winnt-stubs.c,
config/ia64/ia64-c.c, config/m32c/m32c-pragma.c,
config/mep/mep-pragma.c, config/microblaze/microblaze-c.c,
config/rs6000/host-darwin.c, config/rs6000/rs6000-c.c,
config/score/score3.c, config/score/score7.c,
config/sh/symbian-base.c, config/sh/symbian-c.c,
config/sh/symbian-cxx.c, config/sol2-c.c, config/sol2.c,
config/v850/v850-c.c, config/vxworks.c, convert.c, cppbuiltin.c,
cselib.c, dbgcnt.c, ddg.c, dfp.c, dominance.c, emit-rtl.c,
fixed-value.c, fwprop.c, ggc-common.c, gimple.c, gimplify.c,
graphite-blocking.c, graphite-clast-to-gimple.c,
graphite-dependences.c, graphite-flattening.c,
graphite-interchange.c, graphite-poly.c,
graphite-scop-detection.c, graphite.c, haifa-sched.c,
implicit-zee.c, integrate.c, ipa-pure-const.c, ipa-reference.c,
ira-build.c, ira-conflicts.c, ira-costs.c, ira-lives.c, jump.c,
lists.c, loop-doloop.c, loop-iv.c, lto-cgraph.c, lto-compress.c,
lto-opts.c, lto-section-in.c, lto-section-out.c,
lto-streamer-out.c, lto-symtab.c, modulo-sched.c, optabs.c,
params.c, postreload-gcse.c, postreload.c, predict.c, profile.c,
regcprop.c, reginfo.c, regmove.c, reorg.c, resource.c,
sched-deps.c, sched-ebb.c, sched-rgn.c, sdbout.c,
sel-sched-dump.c, sel-sched-ir.c, sese.c, stmt.c, targhooks.c,
tree-cfgcleanup.c, tree-mudflap.c, tree-nomudflap.c,
tree-object-size.c, tree-outof-ssa.c, tree-phinodes.c,
tree-profile.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-coalesce.c,
tree-ssa-live.c, tree-ssa-loop-prefetch.c, tree-ssa-loop.c,
tree-ssa-operands.c, tree-ssa-structalias.c, tree-ssa-uninit.c,
tree-vect-patterns.c, value-prof.c, var-tracking.c, web.c: Don't
include toplev.h.
* Makefile.in (TOPLEV_H): Remove. All uses changed to use
toplev.h. Dependencies for above files and c-family files changed
to remove $(TOPLEV_H) or toplev.h.
(C_TREE_H): Don't include $(TOPLEV_H).
(DIAGNOSTIC_CORE_H): Use $(INPUT_H) instead of input.h. Add
bversion.h.
* config/arm/t-pe, config/arm/t-wince-pe, config/i386/t-cygming,
config/ia64/t-ia64, config/mep/t-mep, config/score/t-score-elf,
config/t-darwin, config/t-sol2,
config/t-vxworks, config/v850/t-v850, config/v850/t-v850e:
Dependencies for above files changed to remove $(TOPLEV_H) or
toplev.h.
c-family:
* c-common.h (parse_optimize_options): Declare.
* c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
cp:
* cp-gimplify.c, cp-lang.c, cvt.c, cxx-pretty-print.c, error.c,
except.c, expr.c, friend.c, init.c, mangle.c, name-lookup.c,
optimize.c, parser.c, rtti.c, tree.c, typeck2.c: Don't include
toplev.h.
* Make-lang.in: Dependencies for above files changed to remove
toplev.h.
java:
* expr.c, lang.c, mangle.c, mangle_name.c, typeck.c,
verify-glue.c: Don't include toplev.h.
* Make-lang.in: Dependencies for above files changed to remove
toplev.h.
lto:
* Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of
$(TOPLEV_H).
From-SVN: r167293
|
|
In gcc/objc/:
2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_eh_runtime_type): Avoid ICE if error_mark_node
is passed as argument.
(objc_begin_catch_clause): Added code to deal with an
error_mark_node or NULL_TREE argument. Improved checks for
invalid arguments. Added code to traverse typedefs.
In gcc/testsuite/:
2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/exceptions-1.m: New.
* objc.dg/exceptions-2.m: New.
* objc.dg/exceptions-3.m: New.
* objc.dg/exceptions-4.m: New.
* objc.dg/exceptions-5.m: New.
* obj-c++.dg/exceptions-1.mm: New.
* obj-c++.dg/exceptions-2.mm: New.
* obj-c++.dg/exceptions-3.mm: New.
* obj-c++.dg/exceptions-4.mm: New.
* obj-c++.dg/exceptions-5.mm: New.
In gcc/cp/:
2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
* parser.c (cp_parser_objc_try_catch_finally_statement): Parse
@catch(...) and pass NULL_TREE to objc_begin_catch_clause() in
that case. Improved error recovery. Reorganized code to be
almost identical to c_parser_objc_try_catch_finally_statement.
In gcc/:
2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
* c-parser.c (c_parser_objc_try_catch_statement): Renamed to
c_parser_objc_try_catch_finally_statement for consistency with the
C++ parser. Parse @catch(...) and pass NULL_TREE to
objc_begin_catch_clause() in that case. Improved error recovery.
Reorganized code to be almost identical to
cp_parser_objc_try_catch_finally_statement.
From-SVN: r167233
|
|
In gcc/:
2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
* c-parser.c (c_parser_objc_protocol_definition): Pass attributes
to objc_declare_protocols.
In gcc/c-family/:
2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
* c-common.h (objc_declare_protocols): Added additional argument.
* stub-objc.c (objc_declare_protocol): Same change.
In gcc/cp/:
2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
* parser.c (cp_parser_objc_protocol_declaration): Pass attributes
to objc_declare_protocols.
In gcc/objc/:
2010-11-19 Nicola Pero <nicola@nicola.brainstorm.co.uk>
* objc-act.c (lookup_protocol): Added 'warn_if_deprecated'
argument. If it is 'true' and the protocol is deprecated, emit a
deprecation warning.
(objc_start_protocol): Do not warn that protocol attributes are
unimplemented. Pass the attributes to start_protocol.
(start_protocol): Added attributes argument. Recognize the
'deprecated' attribute and mark the protocols with TREE_DEPRECATED
if present. Store attributes in the protocol.
(objc_declare_protocols): Added 'attributes' argument. Recognize
the 'deprecated' attribute and mark the protocols with
TREE_DEPRECATED if present. Store attributes in the protocol.
Updated call to lookup_protocol.
(objc_build_protocol_expr): Updated call to lookup_protocol.
(check_protocol_recursively): Same change.
(lookup_and_install_protocols): Same change.
* objc-act.h: Updated comments.
In gcc/testsuite/:
2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/attributes/proto-attribute-1.m: Updated.
* objc.dg/attributes/proto-attribute-2.m: New.
* objc.dg/attributes/proto-attribute-3.m: New.
* obj-c++.dg/attributes/proto-attribute-1.mm: Updated.
* obj-c++.dg/attributes/proto-attribute-2.mm: New.
* obj-c++.dg/attributes/proto-attribute-3.mm: New.
From-SVN: r166938
|
|
2010-11-17 Paolo Bonzini <bonzini@gnu.org>
* c-parser.c (c_token_is_qualifier,
c_parser_next_token_is_qualifier): New.
(c_parser_declaration_or_fndef, c_parser_struct_declaration):
Improve error message on specs->tagdef_seen_p.
(c_parser_struct_or_union_specifier): Improve error recovery.
(c_parser_declspecs): Move exit condition on C_ID_ID early.
Reorganize exit condition for C_ID_TYPENAME/C_ID_CLASSNAME
using c_parser_next_token_is_qualifier; extend it to cover
a ctsk_tagdef typespec and !typespec_ok in general.
testsuite:
2010-11-17 Paolo Bonzini <bonzini@gnu.org>
* gcc.dg/two-types-1.c: New test.
* gcc.dg/two-types-2.c: New test.
* gcc.dg/two-types-3.c: New test.
* gcc.dg/two-types-4.c: New test.
* gcc.dg/two-types-5.c: New test.
* gcc.dg/two-types-6.c: New test.
* gcc.dg/two-types-7.c: New test.
* gcc.dg/two-types-8.c: New test.
* gcc.dg/two-types-9.c: New test.
* gcc.dg/two-types-10.c: New test.
* objc.dg/two-types-1.m: New test.
From-SVN: r166874
|
|
2010-11-13 Paolo Bonzini <bonzini@gnu.org>
PR c/46462
* c-decl.c (declspecs_add_type): Make variables with error types
integers.
* c-parser.c (c_parser_next_tokens_start_declaration): Two IDs
do not start a declaration before an Objective-C foreach.
(c_parser_declaration_or_fndef): Improve recovery after unknown
type name.
(c_parser_for_statement): Hoist entrance of "foreach context"
before ifs, add corresponding reset where it was missing. Do
not set objc_could_be_foreach_context for C.
From-SVN: r166732
|
|
2010-10-30 Paolo Bonzini <bonzini@gnu.org>
PR c/20385
* c-parser.c (c_parser_next_token_starts_declaration): Rename to...
(c_parser_next_tokens_start_declaration): ... this. Handle 2nd
token lookahead.
(c_parser_compound_statement_nostart, c_parser_label,
c_parser_for_statement, c_parser_omp_for_loop): Adjust calls.
(c_parser_declaration_or_fndef): Detect the case now matched by
c_parser_next_tokens_start_declaration, give error and correct it.
testsuite:
2010-11-13 Paolo Bonzini <bonzini@gnu.org>
PR c/20385
* gcc.dg/decl-9.c: New.
From-SVN: r166700
|
|
2010-11-13 Paolo Bonzini <bonzini@gnu.org>
* c-tree.h (enum c_typespec_kind): Add ctsk_none.
(struct c_declspecs): Replace tagdef_seen_p and type_seen_p
with typespec_kind.
* c-decl.c (build_null_declspecs): Initialize typespec_kind.
(shadow_tag_warned, check_compound_literal_type): Adjust
uses of tag_defined_p.
(declspecs_add_type): Set typespec_kind.
* c-parser.c (c_parser_declaration_or_fndef,
c_parser_declspecs, c_parser_struct_declaration,
c_parser_parameter_declaration, c_parser_type_name,
c_parser_objc_diagnose_bad_element_prefix): Adjust uses
of type_seen_p.
* c-typeck.c (c_cast_expr): Use typespec_kind instead of
tag_defined_p, pass ctsk_firstref through.
testsuite:
2010-11-13 Paolo Bonzini <bonzini@gnu.org>
* gcc.dg/Wcxx-compat-8.c: Add testcases involving incomplete types.
From-SVN: r166699
|
|
followed by CPP_CLOSE_BRACE.
* c-parser.c (c_parser_struct_declaration): Handle declaration
specifiers followed by CPP_CLOSE_BRACE.
testsuite:
* gcc.dg/struct-semi-4.c: New test.
From-SVN: r166516
|
|
gcc:
PR target/44981
* doc/extend.tex (format): Document NSString extension.
(format_arg): Likewise.
(Darwin Format Checks): New section.
* doc/tm.texi: Document string object hooks (generated).
* doc/tm.texi.in (TARGET_OBJC_CONSTRUCT_STRING_OBJECT) Rename.
(TARGET_STRING_OBJECT_REF_TYPE_P): New.
(TARGET_CHECK_STRING_OBJECT_FORMAT_ARG): New.
* target.def (objc_construct_string_object): Rename, amend
documentation.
(string_object_ref_type_p): New hook.
(check_string_object_format_arg): New hook.
* c-parser.c (c_parser_attributes): Allow objective-c class names as
attribute identifiers.
* config/darwin-c.c (darwin_cfstring_ref_p): New.
(darwin_check_cfstring_format_arg): New.
(darwin_additional_format_types): New.
* config/darwin-protos.h (darwin_cfstring_ref_p) New.
(darwin_check_cfstring_format_arg): New.
* config/darwin.h (TARGET_OBJC_CONSTRUCT_STRING_OBJECT) Renamed.
(TARGET_STRING_OBJECT_REF_TYPE_P): New.
(TARGET_N_FORMAT_TYPES): New.
(TARGET_CHECK_STRING_OBJECT_FORMAT_ARG): New.
gcc/c-family:
PR target/44981
* c-format.c (format_type): New type gcc_objc_string_format_type.
(valid_stringptr_type_p): New.
(handle_format_arg_attribute): Use valid_stringptr_type_p ().
(check_format_string): Pass expected type, use
valid_stringptr_type_p (), check that the format string types are
consistent with the format specification.
(decode_format_attr): Warn if NSString is used outside objective-c.
(format_types_orig): Add NSString.
(format_name): New.
(format_flags): New.
(check_format_arg): Handle format strings requiring an external parser.
first_target_format_type: New variable.
(handle_format_attribute): Set up first_target_format_type, pass the
expected format arg string type to check_format_string().
* c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
* stub-objc.c (objc_string_ref_type_p): New.
(objc_check_format_arg): New.
gcc/objc:
PR target/44981
* objc-act.c (objc_build_string_object): Amend for renamed hook.
(objc_string_ref_type_p): New.
(objc_check_format_arg): New.
gcc/testsuite:
PR target/44981
* gcc.dg/darwin-cfstring-format-1.c: New.
* gcc.dg/warn-nsstring.c: New.
* objc.dg/fsf-nsstring-format-1.m: New.
* obj-c++.dg/fsf-nsstring-format-1.mm: New.
* obj-c++.dg/torture/strings/const-cfstring-1.mm: Update for darwin10
linker warning.
From-SVN: r166398
|
|
In gcc/:
2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
Fixed using the Objective-C 2.0 dot-syntax with class names.
* c-parser.c (c_parser_next_token_starts_declspecs): In
Objective-C, detect Objective-C 2.0 dot-syntax with a class name.
(c_parser_next_token_starts_declaration): Same.
(c_parser_postfix_expression): Parse the Objective-C 2.0
dot-syntax with a class name.
In gcc/cp/:
2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
Fixed using the Objective-C 2.0 dot-syntax with class names.
* parser.c (cp_parser_primary_expression): Recognize Objective-C
2.0 dot-syntax with class names and process it.
(cp_parser_nonclass_name): Recognize Objective-C 2.0 dot-syntax
with class names.
(cp_parser_class_name): Same change.
(cp_parser_simple_type_specifier): Tidied comments.
In gcc/c-family/:
2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
Fixed using the Objective-C 2.0 dot-syntax with class names.
* c-common.h (objc_build_class_component_ref): New.
* stub-objc.c (objc_build_class_component_ref): New.
In gcc/objc/:
2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
Fixed using the Objective-C 2.0 dot-syntax with class names.
* objc-act.c (objc_build_class_component_ref): New.
In gcc/testsuite/:
2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
Fixed using the Objective-C 2.0 dot-syntax with class names.
* objc.dg/property/dotsyntax-3.m: New.
* objc.dg/property/dotsyntax-4.m: New.
* obj-c++.dg/property/dotsyntax-3.mm: New.
* obj-c++.dg/property/dotsyntax-4.mm: New.
* objc.dg/fobjc-std-1.m: Added test for warnings when the
Objective-C 2.0 dot-syntax is used with class names.
* obj-c++.dg/fobjc-std-1.mm: Same change.
From-SVN: r166333
|
|
In gcc/:
2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
* c-parser.c (c_parser_objc_at_property_declaration): Removed
parsing of RID_COPIES and RID_IVAR. Updated call to
objc_add_property_declaration.
* c-typecheck.c (build_component_ref): Call
objc_maybe_build_component_ref instead of objc_build_setter_call.
Use objc_is_property_ref to improve Objective-C checks.
(cp_build_modify_expr): Call objc_maybe_build_modify_expr instead
of objc_build_getter_call.
In gcc/c-family/:
2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
* c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
(objc_add_property_declaration): Removed arguments for copies and
ivar.
(objc_build_getter_call): Renamed to
objc_maybe_build_component_ref.
(objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
(objc_is_property_ref): New.
* c-common.c (c_common_reswords): Removed copies and ivar.
* stub-objc.c (objc_add_property_declaration): Removed arguments
for copies and ivar.
(objc_build_getter_call): Renamed to
objc_maybe_build_component_ref.
(objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
(objc_is_property_ref): New.
In gcc/cp/:
2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
* parser.c (cp_parser_objc_at_property_declaration): Removed
parsing of RID_COPIES and RID_IVAR. Updated call to
objc_add_property_declaration.
* typecheck.c (finish_class_member_access_expr): Call
objc_maybe_build_component_ref instead of objc_build_setter_call.
(cp_build_modify_expr): Call objc_maybe_build_modify_expr instead
of objc_build_getter_call.
In gcc/objc/:
2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
* objc-tree.def (PROPERTY_REF): New.
* objc-act.h: Added comments for all the PROPERTY_ macros.
(PROPERTY_NAME): Use DECL_NAME.
(PROPERTY_COPIES): Removed.
(PROPERTY_READONLY): Use DECL_LANG_FLAG_0 for it.
(PROPERTY_NONATOMIC): New.
(objc_property_assign_semantics): Make it a typedef.
(PROPERTY_ASSIGN_SEMANTICS): New.
(PROPERTY_DYNAMIC): New.
(PROPERTY_REF_OBJECT): New.
(PROPERTY_REF_PROPERTY_DECL): New.
* objc-act.c (CALL_EXPR_OBJC_PROPERTY_GETTER): Removed.
(in_objc_property_setter_name_context): Removed.
(objc_add_property_declaration): Removed copies and ivar arguments
and code supporting them. Fixed recovering when readonly and
setter attributes are specified. Removed support for @property in
@implementation context. Updated error message. Double-check
that a property does not have a DECL_INITIAL. Validate the
property assign semantics and emit appropriate errors and
warnings. Check for duplicate property declarations. Set
DECL_SOURCE_LOCATION, TREE_DEPRECATED, PROPERTY_NONATOMIC,
PROPERTY_ASSIGN_SEMANTICS and PROPERTY_DYNAMIC of the new
PROPERTY_DECL. Do not set PROPERTY_COPIES. Set
PROPERTY_IVAR_NAME to NULL_TREE.
(objc_build_getter_call): Renamed to
objc_maybe_build_component_ref. If the property is not found in
the interface, search in the protocol list. Do not generate the
getter call; instead, build and return a PROPERTY_REF.
(objc_is_property_ref): New.
(objc_setter_func_call): Removed.
(get_selector_from_reference): Removed.
(is_property): Removed.
(objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
Updated to work on a PROPERTY_REF and use the PROPERTY_DECL from
the PROPERTY_REF. Generate an error if the property is read-only.
(build_property_reference): Removed.
(objc_finish_message_expr): Removed check to produce "readonly
property can not be set" error when
in_objc_property_setter_name_context. We now generate the error
earlier, in objc_maybe_build_modify_expr, which will only generate
the setter call if the property is readwrite.
(check_methods): Recognize dynamic properties.
(check_methods_accessible): Same change.
(objc_build_property_ivar_name): Removed.
(objc_build_property_setter_name): Dropped bool argument. Always
add the ':' at the end.
(objc_gen_one_property_datum): Removed.
(objc_process_getter_setter): Removed.
(objc_synthesize_getter): Mark 'klass' argument as unused. Use
PROPERTY_GETTER_NAME instead of PROPERTY_NAME. Set the
DECL_SOURCE_LOCATION of the new method to be the same as the one
for the @synthesize. Always use PROPERTY_IVAR_NAME as it is
instead of trying to guess what it should be. Removed use of
CLASS_IVARS. Use the location of @synthesize for c_finish_return
and c_end_compound_statement.
(objc_synthesize_setter): Mark 'klass' argument as unused. Use
PROPERTY_SETTER_NAME instead of trying to guess what it should be.
Set the DECL_SOURCE_LOCATION of the new method to be the same as
the one for the @synthesize. Always use PROPERTY_IVAR_NAME as it
is instead of trying to guess what it should be. Removed use of
CLASS_IVARS. Use the location of @synthesize for c_finish_return
and c_end_compound_statement. Emit an error and keep going,
instead of aborting, if the setter prototype does not have the
expected argument.
(objc_add_synthesize_declaration_for_property): New.
(objc_add_synthesize_declaration): Removed ATTRIBUTE_UNUSED from
all arguments. Improved error message. Filled in the rest of the
function, which used to be a placeholder, with an actual
implementation.
(objc_add_dynamic_declaration_for_property): New.
(objc_add_dynamic_declaration): Removed ATTRIBUTE_UNUSED from all
arguments. Improved error message. Filled in the rest of the
function, which used to be a placeholder, with an actual
implementation.
(objc_gen_property_data): Rewritten.
(finish_class): Added explicit switch cases for
CLASS_INTERFACE_TYPE, CATEGORY_INTERFACE_TYPE and
PROTOCOL_INTERFACE_TYPE. Added a default switch case which is
gcc_unreachable. Rewritten the processing of properties, in
particular to not synthesize prototypes for getters and setters if
they already exist and to install the getter and setter names into
PROPERTY_GETTER_NAME and PROPERTY_SETTER_NAME. Do not generate
warnings about setter, getter and ivar property attributes.
(objc_lookup_ivar): Removed support for properties.
(objc_gimplify_property_ref): New.
(objc_gimplify_expr): Use a switch. In case of a PROPERTY_REF, call
objc_gimplify_property_ref.
In gcc/testsuite/:
2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
* objc.dg/property/property-neg-1.m: Updated for changes in the
syntax of @property and the implementation of
@synthesize/@dynamic.
* objc.dg/property/property-neg-2.m: Same change.
* objc.dg/property/property-neg-3.m: Same change.
* objc.dg/property/property-neg-4.m: Same change.
* objc.dg/property/property-neg-5.m: Same change.
* objc.dg/property/property-neg-7.m: Same change.
* objc.dg/property/property-1.m: Same change.
* objc.dg/property/synthesize-1.m: Same change.
* objc.dg/property/at-property-2.m: Same change.
* objc.dg/property/at-property-4.m: Same change.
* objc.dg/property/fsf-property-method-acces.m: Updated for
changes in the syntax of @property and the implementation of
@synthesize/@dynamic. Use the same code for GNU and NeXT runtime.
* objc.dg/property/fsf-property-basic.m: Same change.
* objc.dg/property/fsf-property-named-ivar.m: Same change.
* objc.dg/property/at-property-5.m: New.
* objc.dg/property/at-property-6.m: New.
* objc.dg/property/at-property-7.m: New.
* objc.dg/property/at-property-8.m: New.
* objc.dg/property/at-property-9.m: New.
* objc.dg/property/at-property-10.m: New.
* objc.dg/property/at-property-11.m: New.
* objc.dg/property/synthesize-2.m: New.
* objc.dg/property/dynamic-2.m: New.
* obj-c++.dg/property/property-neg-1.mm: Updated for changes in the
syntax of @property and the implementation of
@synthesize/@dynamic.
* obj-c++.dg/property/property-neg-2.mm: Same change.
* obj-c++.dg/property/property-neg-3.mm: Same change.
* obj-c++.dg/property/property-neg-4.mm: Same change.
* obj-c++.dg/property/property-neg-5.mm: Same change.
* obj-c++.dg/property/property-neg-7.mm: Same change.
* obj-c++.dg/property/property-1.mm: Same change.
* obj-c++.dg/property/synthesize-1.mm: Same change.
* obj-c++.dg/property/at-property-2.mm: Same change.
* obj-c++.dg/property/at-property-4.mm: Same change.
* obj-c++.dg/property/fsf-property-method-acces.mm: Updated for
changes in the syntax of @property and the implementation of
@synthesize/@dynamic. Use the same code for GNU and NeXT runtime.
* obj-c++.dg/property/fsf-property-basic.mm: Same change.
* obj-c++.dg/property/fsf-property-named-ivar.mm: Same change.
* obj-c++.dg/property/at-property-5.mm: New.
* obj-c++.dg/property/at-property-6.mm: New.
* obj-c++.dg/property/at-property-7.mm: New.
* obj-c++.dg/property/at-property-8.mm: New.
* obj-c++.dg/property/at-property-9.mm: New.
* obj-c++.dg/property/at-property-10.mm: New.
* obj-c++.dg/property/at-property-11.mm: New.
* obj-c++.dg/property/synthesize-2.mm: New.
* obj-c++.dg/property/dynamic-2.mm: New.
From-SVN: r166087
|
|
In gcc/:
2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
* c-parser.c (c_parser_objc_at_property_declaration): Recognize
RID_ASSIGN, RID_COPY, RID_RETAIN, RID_READWRITE and RID_NONATOMIC.
Do not use objc_set_property_attr, but use local variables
instead. Detect repeated usage of setter, getter and ivar
attributes. Improved error processing when a setter name does not
end in ':'. Do not check for CPP_CLOSE_PAREN after we determined
that the token is a keyword. Updated call to
objc_add_property_declaration.
In gcc/cp/:
2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
* parser.c (cp_parser_objc_at_property_declaration): Recognize
RID_ASSIGN, RID_COPY, RID_RETAIN, RID_READWRITE and RID_NONATOMIC.
Do not use objc_set_property_attr, but use local variables
instead. Detect repeated usage of setter, getter and ivar
attributes. Improved error processing when a setter name does not
end in ':'. Do not check for CPP_CLOSE_PAREN after we determined
that the token is a keyword. Updated call to
objc_add_property_declaration.
In gcc/c-family/:
2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
* c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
and RID_LAST_PATTR.
(objc_add_property_declaration): Added additional arguments.
(objc_property_attribute_kind): Removed.
(objc_set_property_attr): Removed.
* c-common.c (c_common_reswords): Added readwrite, assign, retain,
copy and nonatomic.
* stub-objc.c (objc_add_property_declaration): Added additional
arguments.
(objc_set_property_attr): Removed.
In gcc/objc/:
2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_add_property_declaration): Added arguments to
pass the various property attributes that were parsed with the
property declaration. Process arguments to determine the final
property attributes and produce error messages as appropriate.
Added temporary code to keep the compiler silent about variables
set but not used - for new attributes that are only checked but
have no effect yet.
(property_readonly): Removed.
(property_setter): Removed.
(property_getter): Removed.
(property_ivar): Removed.
(property_copies): Removed.
(objc_set_property_attr): Removed.
* objc-act.h (enum property_assign_semantics): New.
In gcc/testsuite/:
2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
* obj-c.dg/property/at-property-4.m: New.
* obj-c++.dg/property/at-property-4.mm: New.
* obj-c++.dg/property/property-neg-5.m: Updated testcase for
updates in warning.
* obj-c++.dg/property/property-neg-5.mm: Updated testcase for
updates in warning.
From-SVN: r165997
|
|
In gcc/:
2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
* c-parser.c (c_parser_objc_at_property): Renamed to
c_parser_objc_at_property_declaration. Updated calls to
objc_add_property_variable, now objc_add_property_declaration.
Code rewritten to be much more robust in recovering from syntax
errors. Added comments.
(c_parser_objc_property_attrlist): Removed.
(c_parser_external_declaration): Updated calls to
c_parser_objc_at_property, now
c_parser_objc_at_property_declaration.
(c_parser_objc_methodprotolist): Same change.
In gcc/c-family/:
2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
* c-common.h (objc_add_property_variable): Renamed to
objc_add_property_declaration. Added location argument.
* stub-objc.c (objc_add_property_variable): Same change.
In gcc/cp/:
2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
* parser.c (cp_parser_objc_property_decl): Renamed to
cp_parser_objc_struct_declaration. Return the parsed trees
instead of calling objc_add_property_variable directly. Detect
missing or invalid declspecs. Implemented attributes. Do not eat
the ';' at the end. Exit loop whenever a non-comma is parsed, not
just EOF.
(cp_parser_objc_at_property): Renamed to
cp_parser_objc_at_property_declaration. Updated calls to
objc_add_property_variable, now objc_add_property_declaration, and
to cp_parser_objc_property_decl, now
cp_parser_objc_struct_declaration. Rewritten all code to be more
robust in dealing with syntax errors, and almost identical to the
one in c_parser_objc_at_property_declaration.
(cp_parser_objc_property_attrlist): Removed.
(cp_parser_objc_method_prototype_list): Updated call to
cp_parser_objc_at_property.
(cp_parser_objc_method_definition_list): Same change.
(cp_parser_objc_class_ivars): Detect a number of invalid
declarations of instance variables and produce errors when they
are found.
In gcc/objc/:
2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_add_property_variable): Renamed to
objc_add_property_declaration. Added location argument. Updated
warnings and errors to use it. Use error, not fatal_error, if a
property declaration is found outside an interface or
implementation context.
In gcc/testsuite/:
2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/property/at-property-1.m: New.
* objc.dg/property/at-property-2.m: New.
* objc.dg/property/at-property-3.m: New.
* objc.dg/ivar-invalid-type-1.m: New.
* obj-c++.dg/property/at-property-1.mm: New.
* obj-c++.dg/property/at-property-2.mm: New.
* obj-c++.dg/property/at-property-3.mm: New.
* obj-c++.dg/ivar-invalid-type-1.mm: New.
* objc.dg/property/property-neg-6.m: Updated testcase for updates
in error reporting.
From-SVN: r165996
|
|
In gcc/:
2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
* parser.c (c_parser_objc_method_type): Mark inline. Return a
bool instead of a tree.
(c_parser_objc_method_decl): Added bool argument. Updated call to
objc_build_method_signature.
(c_parser_objc_method_definition): Do not call
objc_set_method_type. Updated calls to c_parser_objc_method_type,
c_parser_objc_method_decl and objc_start_method_definition.
(c_parser_objc_methodproto): Do not call objc_set_method_type.
Updated calls to c_parser_objc_method_type,
c_parser_objc_method_decl and objc_add_method_declaration.
In gcc/c-family/:
2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
* c-common.h (objc_set_method_type): Removed.
(objc_add_method_declaration): Added boolean argument.
(objc_start_method_definition): Same change.
(objc_build_method_signature): Same change.
* stub-objc.c (objc_set_method_type): Removed.
(objc_add_method_declaration): Added boolean argument.
(objc_start_method_definition): Same change.
(objc_build_method_signature): Same change.
In gcc/cp/:
2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
* parser.c (cp_parser_objc_method_type): Mark inline. Return a
bool instead of calling objc_set_method_type.
(cp_parser_objc_method_signature): Updated calls to
cp_parser_objc_method_type and to objc_build_method_signature.
(cp_parser_objc_method_prototype_list): Updated calls to
objc_add_method_declaration. Use token->type to determine if it
is a class method or not.
(cp_parser_objc_method_definition_list): Same change.
In gcc/objc/:
2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.h (objc_inherit_code): Removed.
* objc-act.c (objc_inherit_code): Removed.
(objc_set_method_type): Removed.
(objc_build_method_signature): Added is_class_method argument.
Use it instead of the global objc_inherit_code variable.
(objc_add_method_declaration): Same change.
(objc_start_method_definition): Same change.
(objc_generate_cxx_ctor_or_dtor): Updated call to
objc_start_method_definition. Do not call objc_set_method_type.
(adjust_type_for_id_default): Mark as inline.
(objc_synthesize_getter): Updated call to
objc_start_method_definition. Do not set objc_inherit_code.
(objc_synthesize_setter): Updated call to
objc_start_method_definition. Do not set objc_inherit_code.
From-SVN: r165741
|
|
In gcc/:
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented parsing @synthesize and @dynamic for Objective-C.
* c-parser.c (c_parser_external_declaration): Recognize
RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
(c_parser_objc_at_synthesize_declaration): New.
(c_parser_objc_at_dynamic_declaration): New.
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
* c-parser.c (c_parser_objc_class_declaration): After finding an
error, parse the whole declaration then reset parser->error.
In gcc/cp/:
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented parsing @synthesize and @dynamic for Objective-C++.
* parser.c (cp_parser_objc_method_definition_list): Recognize
RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
(cp_parser_objc_at_dynamic_declaration): New.
(cp_parser_objc_at_synthesize_declaration): New.
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
* parser.c (cp_parser_objc_identifier_list): Check the return
value of cp_parser_identifier and react if it is error_mark_node.
In gcc/objc/:
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented parsing @synthesize and @dynamic for
Objective-C/Objective-C++.
* objc-act.c (objc_add_synthesize_declaration): New.
(objc_add_dynamic_declaration): New.
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (lookup_and_install_protocols): Return NULL if passed
error_mark_node.
In gcc/testsuite/:
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented parsing @synthesize and @dynamic for
Objective-C/Objective-C++.
* objc.dg/property/dynamic-1.m: New.
* objc.dg/property/synthesize-1.m: New.
* obj-c++.dg/property/dynamic-1.mm: New.
* obj-c++.dg/property/synthesize-1.mm: New.
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/at-class-1.m: New.
* objc.dg/at-class-1.mm: New.
From-SVN: r165667
|
|
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_objc_type_name): Adapted to new parser the
following Objective-C change:
2005-10-10 Fariborz Jahanian <fjahanian@apple.com>
Radar 4301047
* c-parse.in (objc_quals): Build objc qualifier list same way
as gcc-3.3
In gcc/testsuite/:
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/proto-qual-1.m: Adjust test for GNU runtime to match
bugfix.
From-SVN: r165656
|
|
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
|
|
PR c/46015
* c-parser.c (c_parser_statement_after_labels): Call mark_exp_read
on computed goto argument.
* semantics.c (finish_goto_stmt): Call mark_rvalue_use on computed
goto destination.
* c-c++-common/Wunused-var-13.c: New test.
From-SVN: r165643
|
|
before if.
* c-parser.c (c_parser_for_statement): Move initialization of
cond and incr before if.
From-SVN: r165592
|
|
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
|
|
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
|
|
From-SVN: r165411
|
|
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
|
|
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
|
|
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
|
|
In gcc/c-family/:
2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
* c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
Objective-C/Objective-C++ keywords.
In gcc/cp/:
2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
* parser.c (cp_lexer_get_preprocessor_token): Tidied up comments
and indentation when finding an Objective-C++ CPP_AT_NAME token.
In gcc/:
2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
* c-parser.c (c_lex_one_token): When finding a CPP_AT_NAME
Objective-C token, map RID_CLASS to RID_AT_CLASS and similar.
(c_parser_external_declaration): Use RID_AT_CLASS
instead of RID_CLASS.
(c_parser_objc_class_declaration): Same change.
(c_parser_objc_try_catch_statement): Use RID_AT_TRY instead of
RID_TRY and RID_AT_CATCH instead of RID_CATCH.
(c_parser_objc_class_instance_variables): Use RID_AT_PRIVATE
instead of RID_PRIVATE, RID_AT_PROTECTED instead of RID_PROTECTED
and RID_AT_PUBLIC instead of RID_PUBLIC.
(c_parser_statement_after_labels): Use RID_AT_TRY instead of
RID_TRY and RID_AT_CATCH instead of RID_CATCH.
From-SVN: r164744
|
|
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
|
|
variables.
gcc:
* optc-gen.awk: Generate global_options initializer instead of
individual variables. Add x_ prefix to names of structure
members.
* opth-gen.awk: Generate gcc_options structure. Add x_ prefix to
names of structure members.
* doc/tm.texi.in (HARD_FRAME_POINTER_IS_FRAME_POINTER,
HARD_FRAME_POINTER_IS_ARG_POINTER): Document.
* doc/tm.texi: Regenerate.
* alias.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
* builtins.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER.
* c-parser.c (disable_extension_diagnostics,
restore_extension_diagnostics): Update names of cpp_options
members.
* combine.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
* common.opt (fcompare-debug-second): Don't use Var.
* config/alpha/alpha.h (target_flags): Remove.
* config/arm/arm.h (HARD_FRAME_POINTER_IS_FRAME_POINTER,
HARD_FRAME_POINTER_IS_ARG_POINTER): Define.
* config/bfin/bfin.h (target_flags): Remove.
* config/cris/cris.h (target_flags): Remove.
* config/i386/i386-c.c (ix86_pragma_target_parse): Update names of
cl_target_option members.
* config/i386/i386.c (ix86_force_align_arg_pointer): Remove.
(ix86_function_specific_print, ix86_valid_target_attribute_tree,
ix86_can_inline_p): Update names of cl_target_option members.
* config/i386/i386.h (ix86_isa_flags): Remove.
* config/lm32/lm32.h (target_flags): Remove.
* config/mcore/mcore.h (mcore_stack_increment): Remove.
* config/mcore/mcore.md (addsi3): Remove extern declaration of
flag_omit_frame_pointer.
* config/mep/mep.h (target_flags): Remove.
* config/mips/mips.h (HARD_FRAME_POINTER_IS_FRAME_POINTER,
HARD_FRAME_POINTER_IS_ARG_POINTER): Define.
* config/mmix/mmix.h (target_flags): Remove.
* config/rs6000/rs6000.h (rs6000_xilinx_fpu, flag_pic,
flag_expensive_optimizations): Remove.
* config/s390/s390.h (flag_pic): Remove.
* config/score/score-conv.h (target_flags): Remove.
* config/sh/sh.h (sh_fixed_range_str): Remove.
* config/spu/spu.h (target_flags, spu_fixed_range_string): Remove.
* dbxout.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER
* df-scan.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
* diagnostic.c (diagnostic_initialize): Update names of
diagnostic_context members.
* diagnostic.h (diagnostic_context): Rename inhibit_warnings and
warn_system_headers.
(diagnostic_report_warnings_p): Update for new names.
* dwarf2out.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER
* emit-rtl.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER and
HARD_FRAME_POINTER_IS_ARG_POINTER.
* flags.h (flag_compare_debug): Declare.
* ira.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
* opts.c (flag_compare_debug): Define.
(common_handle_option): Update names of diagnostic_context
members. Handle -fcompare-debug-second.
(fast_math_flags_struct_set_p): Update names of cl_optimization
members.
* reginfo.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
* regrename.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
* reload.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
* reload1.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
* resource.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
* rtl.h (HARD_FRAME_POINTER_IS_FRAME_POINTER,
HARD_FRAME_POINTER_IS_ARG_POINTER): Define and use.
* sel-sched.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
* stmt.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER.
gcc/c-family:
* c-common.c (c_cpp_error): Update names of diagnostic_context
members.
* c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
cl_optimization members.
* c-opts.c (warning_as_error_callback, c_common_handle_option,
sanitize_cpp_opts, finish_options): Update names of cpp_options
members.
gcc/fortran:
* cpp.c (cpp_define_builtins): Update names of gfc_option_t
members.
(gfc_cpp_post_options): Update names of cpp_options members.
(cb_cpp_error): Update names of diagnostic_context members.
* f95-lang.c (gfc_init_builtin_functions): Update names of
gfc_option_t members.
* gfortran.h (gfc_option_t): Rename warn_conversion and
flag_openmp.
* intrinsic.c (gfc_convert_type_warn): Update names of
gfc_option_t members.
* options.c (gfc_init_options, gfc_post_options, set_Wall,
gfc_handle_option): Update names of gfc_option_t members.
* parse.c (next_free, next_fixed): Update names of gfc_option_t
members.
* scanner.c (pedantic): Remove extern declaration.
(skip_free_comments, skip_fixed_comments, include_line): Update
names of gfc_option_t members.
* trans-decl.c (gfc_generate_function_code): Update names of
gfc_option_t members.
gcc/java:
* java-tree.h (flag_filelist_file, flag_assert, flag_jni,
flag_force_classes_archive_check, flag_redundant, flag_newer,
flag_use_divide_subroutine, flag_use_atomic_builtins,
flag_use_boehm_gc, flag_hash_synchronization,
flag_check_references, flag_optimize_sci, flag_indirect_classes,
flag_indirect_dispatch, flag_store_check,
flag_reduced_reflection): Remove.
* jcf-dump.c (flag_newer): Remove.
* jcf.h (quiet_flag): Remove.
* parse.h (quiet_flag): Remove.
libcpp:
* include/cpplib.h (cpp_options): Rename warn_deprecated,
warn_traditional, warn_long_long and pedantic.
* directives.c (directive_diagnostics, _cpp_handle_directive):
Update names of cpp_options members.
* expr.c (cpp_classify_number, eval_token): Update names of
cpp_options members.
* init.c (cpp_create_reader, post_options): Update names of
cpp_options members.
* internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of
cpp_options members.
* macro.c (parse_params): Update names of cpp_options members.
From-SVN: r164723
|
|
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
|
|
In gcc/:
2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
* c-parser.c (c_lex_one_token): In Objective-C, do not replace
token->value with the canonical spelling. Do exactly like C and
C++ and leave it as it is.
From-SVN: r164708
|
|
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
|
|
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
|
|
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
|
|
* c-tree.h, c-decl.c (build_enumerator): Add location parameter.
* c-parser.c (c_parser_enum_specifier): Adjust call to build_enumerator.
From-SVN: r163988
|
|
PR middle-end/45423
* gimplify.c (goa_stabilize_expr): Handle TRUTH_NOT_EXPR
and TRUTH_{AND,OR,XOR}_EXPR.
* c-parser.c (c_parser_omp_atomic): Handle boolean
{PRE,POST}_{INC,DEC}REMENT.
cp/
* parser.c (cp_parser_omp_atomic): Handle boolean
{PRE,POST}_INCREMENT.
testsuite/
* gcc.dg/gomp/atomic-12.c: New test.
* gcc.dg/gomp/atomic-13.c: New test.
* gcc.dg/gomp/atomic-14.c: New test.
* g++.dg/gomp/atomic-11.C: New test.
* g++.dg/gomp/atomic-12.C: New test.
* g++.dg/gomp/atomic-13.C: New test.
* g++.dg/gomp/atomic-14.C: New test.
From-SVN: r163653
|
|
* c-tree.h (build_arg_info): Declare.
* c-decl.c (build_arg_info): Define.
(get_parm_info): Call it. Delete initialization code.
* c-parser.c (c_parser_parms_declarator): Likewise.
(c_parser_parms_list_declaractor): Likewise.
From-SVN: r163014
|
|
* tree.h (enum tree_index): Add TI_INTEGER_THREE.
(integer_three_node): Add.
* tree.c (build_common_tree_nodes_2): Use integer_type_node insead of
NULL_TREE in build_int_cst calls. Initialize the integer_three_node.
* builtins.c (expand_builtin_prefetch): Use common tree nodes instead
of call build_int_cst.
* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Ditto.
* tree-ssa-loop-ivopts.c (idx_find_step): Ditto.
(find_interesting_uses_address): Ditto.
* tree-ssa-alias.c (ao_ref_init_from_ptr_and_size): Ditto.
* tree-eh.c (lower_eh_constructs_2): Ditto.
* tree-vect-loop.c (get_initial_def_for_induction): Ditto.
* c-typeck.c (really_start_incremental_init, push_init_level): Ditto.
* expmed.c (expand_divmod): Ditto.
* tree-mudflap.c (mx_register_decls): Ditto.
* varasm.c (array_size_for_constructor): Ditto.
* tree-ssa-loop-prefetch.c (issue_prefetch_ref): Ditto.
* c-parser.c (c_parser_postfix_expression): Ditto.
/cp
* decl.c (integer_three_node): Remove.
(cxx_init_decl_processing): Do not initialize the integer_three_node.
* cp-tree.h (integer_three_node): Remove.
From-SVN: r162230
|
|
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
|
|
gcc/
* c-parser.c (c_parser_omp_for_loop): Use a VEC for for_block.
gcc/cp/
* parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
From-SVN: r161599
|