]> gcc.gnu.org Git - gcc.git/blobdiff - gcc/objcp/objcp-decl.c
Update copyright years in gcc/
[gcc.git] / gcc / objcp / objcp-decl.c
index c7882077b451f0dfaeeeefba9886a169d9162e29..ef293493164e82edc1ec404ef62a164616d51e07 100644 (file)
@@ -1,13 +1,13 @@
 /* Process the ObjC-specific declarations and variables for 
    the Objective-C++ compiler.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005-2014 Free Software Foundation, Inc.
    Contributed by Ziemowit Laski  <zlaski@apple.com>
 
 This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
+Software Foundation; either version 3, or (at your option) any later
 version.
 
 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
@@ -16,36 +16,26 @@ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 for more details.
 
 You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to the Free
-Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301, USA.  */
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
-#include "rtl.h"
-#include "expr.h"
 #include "cp-tree.h"
-#include "c-common.h"
-#include "flags.h"
-#include "input.h"
-#include "except.h"
-#include "output.h"
-#include "toplev.h"
-#include "cpplib.h"
-#include "debug.h"
-#include "target.h"
-#include "varray.h"
+#include "hashtab.h"
 
+#include "c-family/c-objc.h"
 #include "objc-act.h"
 #include "objcp-decl.h"
 
 /* Hacks to simulate start_struct() and finish_struct(). */
 
 tree 
-objcp_start_struct (enum tree_code code ATTRIBUTE_UNUSED, tree name)
+objcp_start_struct (location_t loc ATTRIBUTE_UNUSED,
+                   enum tree_code code ATTRIBUTE_UNUSED, tree name)
 {
   tree s;
   /* The idea here is to mimic the actions that the C++ parser takes when
@@ -63,7 +53,8 @@ objcp_start_struct (enum tree_code code ATTRIBUTE_UNUSED, tree name)
 }
 
 tree 
-objcp_finish_struct (tree t, tree fieldlist, tree attributes)
+objcp_finish_struct (location_t loc ATTRIBUTE_UNUSED,
+                    tree t, tree fieldlist, tree attributes)
 {
   tree field, next_field;
 
@@ -74,6 +65,13 @@ objcp_finish_struct (tree t, tree fieldlist, tree attributes)
     finish_member_declaration (field);
   }
   t = finish_struct (t, attributes);
+
+  /* If we are inside an @interface and are generating the list of
+     ivars, we need to check for duplicate ivars.
+  */
+  if (fieldlist)
+    objc_detect_field_duplicates (true);
+
   pop_lang_context ();
 
   return t;
This page took 0.03559 seconds and 5 git commands to generate.