summaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authornicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-27 04:37:47 +0000
committernicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-27 04:37:47 +0000
commit1d894bcf47c398d81f7ea42eff8a5da823799bf7 (patch)
tree6ea8370f843d34af7151be0a948bae894059845f /gcc/c-family
parentde15c1a82e546fe8e6726a145b48571951a782bd (diff)
downloadgcc-1d894bcf47c398d81f7ea42eff8a5da823799bf7.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165996 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog6
-rw-r--r--gcc/c-family/c-common.h2
-rw-r--r--gcc/c-family/stub-objc.c2
3 files changed, 8 insertions, 2 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index b73e45a8f54..d742912f8ab 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
* c-common.h (objc_maybe_printable_name): New.
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index 8031bb44a34..55637659946 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -1043,7 +1043,7 @@ extern void objc_finish_foreach_loop (location_t, tree, tree, tree, tree, tree);
extern void objc_set_property_attr
(location_t, objc_property_attribute_kind, tree);
extern bool objc_method_decl (enum tree_code);
-extern void objc_add_property_variable (tree);
+extern void objc_add_property_declaration (location_t, tree);
extern tree objc_build_getter_call (tree, tree);
extern tree objc_build_setter_call (tree, tree);
extern void objc_add_synthesize_declaration (location_t, tree);
diff --git a/gcc/c-family/stub-objc.c b/gcc/c-family/stub-objc.c
index f808dc76f6b..fb92c7fc0bb 100644
--- a/gcc/c-family/stub-objc.c
+++ b/gcc/c-family/stub-objc.c
@@ -331,7 +331,7 @@ objc_set_property_attr (location_t ARG_UNUSED (loc),
}
void
-objc_add_property_variable (tree ARG_UNUSED (prop))
+objc_add_property_declaration (location_t ARG_UNUSED (loc), tree ARG_UNUSED (prop))
{
}