aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog16
-rw-r--r--gcc/Makefile.in4
-rw-r--r--gcc/c-config-lang.in2
-rw-r--r--gcc/c-decl.c16
-rw-r--r--gcc/c-lang.h60
-rw-r--r--gcc/c-objc-common.h2
-rw-r--r--gcc/c-tree.h35
-rw-r--r--gcc/c-typeck.c1
-rw-r--r--gcc/gengtype.c2
-rw-r--r--gcc/objc/ChangeLog5
-rw-r--r--gcc/objc/Make-lang.in2
-rw-r--r--gcc/objc/objc-act.c1
12 files changed, 90 insertions, 56 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f9dce70..e5b01aa 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,19 @@
+2009-08-20 Richard Guenther <rguenther@suse.de>
+
+ * c-objc-common.h (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Do not
+ define.
+ * c-tree.h (c_dup_lang_specific_decl): Remove.
+ (struct lang_decl, struct lang_type): Move definitions ...
+ * c-lang.h: ... here. New file.
+ * c-decl.c: Include c-lang.h.
+ (c_dup_lang_specific_decl): Remove.
+ * c-typeck.c: Include c-lang.h.
+ * Makefile.in (c-decl.o): Add c-lang.h dependency.
+ (c-typeck.o): Likewise.
+ * c-config-lang.in (gtfiles): Add c-lang.h.
+ * gengtype.c (get_output_file_with_visibility): Handle c-lang.h
+ like c-tree.h.
+
2009-08-20 Uros Bizjak <ubizjak@gmail.com>
* config/alpha/alpha.c (alpha_end_function): Do not clear
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 3ab1771..9e83254 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1925,11 +1925,11 @@ c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
opts.h $(C_PRAGMA_H) gt-c-decl.h $(CGRAPH_H) $(HASHTAB_H) libfuncs.h \
$(EXCEPT_H) $(LANGHOOKS_DEF_H) $(TREE_DUMP_H) $(C_COMMON_H) $(CPPLIB_H) \
$(DIAGNOSTIC_H) $(INPUT_H) langhooks.h $(GIMPLE_H) tree-mudflap.h \
- pointer-set.h $(BASIC_BLOCK_H) $(GIMPLE_H) tree-iterator.h
+ pointer-set.h $(BASIC_BLOCK_H) $(GIMPLE_H) tree-iterator.h c-lang.h
c-typeck.o : c-typeck.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(C_TREE_H) $(TARGET_H) $(FLAGS_H) intl.h output.h $(EXPR_H) \
$(RTL_H) $(TOPLEV_H) $(TM_P_H) langhooks.h $(GGC_H) $(TREE_FLOW_H) \
- $(GIMPLE_H) tree-iterator.h
+ $(GIMPLE_H) tree-iterator.h c-lang.h
c-lang.o : c-lang.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(C_TREE_H) $(DIAGNOSTIC_H) \
$(GGC_H) langhooks.h $(LANGHOOKS_DEF_H) $(C_COMMON_H) gtype-c.h \
diff --git a/gcc/c-config-lang.in b/gcc/c-config-lang.in
index f53f509..d3cd6f9 100644
--- a/gcc/c-config-lang.in
+++ b/gcc/c-config-lang.in
@@ -22,4 +22,4 @@
# files used by C that have garbage collection GTY macros in them
# which therefore need to be scanned by gengtype.c.
-gtfiles="\$(srcdir)/c-lang.c \$(srcdir)/c-tree.h \$(srcdir)/c-decl.c \$(srcdir)/c-common.c \$(srcdir)/c-common.h \$(srcdir)/c-pragma.h \$(srcdir)/c-pragma.c \$(srcdir)/c-objc-common.c \$(srcdir)/c-parser.c"
+gtfiles="\$(srcdir)/c-lang.c \$(srcdir)/c-tree.h \$(srcdir)/c-decl.c \$(srcdir)/c-common.c \$(srcdir)/c-common.h \$(srcdir)/c-pragma.h \$(srcdir)/c-pragma.c \$(srcdir)/c-objc-common.c \$(srcdir)/c-parser.c \$(srcdir)/c-lang.h"
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index b594767..9940f92 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -50,6 +50,7 @@ along with GCC; see the file COPYING3. If not see
#include "timevar.h"
#include "c-common.h"
#include "c-pragma.h"
+#include "c-lang.h"
#include "langhooks.h"
#include "tree-mudflap.h"
#include "gimple.h"
@@ -8136,21 +8137,6 @@ c_pop_function_context (void)
warn_about_return_type = p->warn_about_return_type;
}
-/* Copy the DECL_LANG_SPECIFIC data associated with DECL. */
-
-void
-c_dup_lang_specific_decl (tree decl)
-{
- struct lang_decl *ld;
-
- if (!DECL_LANG_SPECIFIC (decl))
- return;
-
- ld = GGC_NEW (struct lang_decl);
- memcpy (ld, DECL_LANG_SPECIFIC (decl), sizeof (struct lang_decl));
- DECL_LANG_SPECIFIC (decl) = ld;
-}
-
/* The functions below are required for functionality of doing
function at once processing in the C front end. Currently these
functions are not called from anywhere in the C front end, but as
diff --git a/gcc/c-lang.h b/gcc/c-lang.h
new file mode 100644
index 0000000..beed507
--- /dev/null
+++ b/gcc/c-lang.h
@@ -0,0 +1,60 @@
+/* Definitions for C language specific types.
+ Copyright (C) 2009
+ Free Software Foundation, Inc.
+
+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 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+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 COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef GCC_C_LANG_H
+#define GCC_C_LANG_H
+
+#include "c-common.h"
+#include "ggc.h"
+
+struct GTY(()) lang_type {
+ /* In a RECORD_TYPE, a sorted array of the fields of the type. */
+ struct sorted_fields_type * GTY ((reorder ("resort_sorted_fields"))) s;
+ /* In an ENUMERAL_TYPE, the min and max values. */
+ tree enum_min;
+ tree enum_max;
+ /* In a RECORD_TYPE, information specific to Objective-C, such
+ as a list of adopted protocols or a pointer to a corresponding
+ @interface. See objc/objc-act.h for details. */
+ tree objc_info;
+};
+
+struct GTY(()) lang_decl {
+ char dummy;
+};
+
+/* Save and restore the variables in this file and elsewhere
+ that keep track of the progress of compilation of the current function.
+ Used for nested functions. */
+
+struct GTY(()) language_function {
+ struct c_language_function base;
+ tree x_break_label;
+ tree x_cont_label;
+ struct c_switch * GTY((skip)) x_switch_stack;
+ struct c_arg_info * GTY((skip)) arg_info;
+ int returns_value;
+ int returns_null;
+ int returns_abnormally;
+ int warn_about_return_type;
+};
+
+
+#endif /* ! GCC_C_LANG_H */
diff --git a/gcc/c-objc-common.h b/gcc/c-objc-common.h
index aaff1c9..e90236e 100644
--- a/gcc/c-objc-common.h
+++ b/gcc/c-objc-common.h
@@ -54,8 +54,6 @@ along with GCC; see the file COPYING3. If not see
#define LANG_HOOKS_TYPES_COMPATIBLE_P c_types_compatible_p
#undef LANG_HOOKS_MISSING_NORETURN_OK_P
#define LANG_HOOKS_MISSING_NORETURN_OK_P c_missing_noreturn_ok_p
-#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
-#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL c_dup_lang_specific_decl
#undef LANG_HOOKS_BUILTIN_FUNCTION
#define LANG_HOOKS_BUILTIN_FUNCTION c_builtin_function
#undef LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE
diff --git a/gcc/c-tree.h b/gcc/c-tree.h
index c01cc66..502e6ef 100644
--- a/gcc/c-tree.h
+++ b/gcc/c-tree.h
@@ -31,12 +31,6 @@ along with GCC; see the file COPYING3. If not see
#define C_SIZEOF_STRUCT_LANG_IDENTIFIER \
(sizeof (struct c_common_identifier) + 3 * sizeof (void *))
-/* Language-specific declaration information. */
-
-struct GTY(()) lang_decl {
- char dummy;
-};
-
/* In a RECORD_TYPE or UNION_TYPE, nonzero if any component is read-only. */
#define C_TYPE_FIELDS_READONLY(TYPE) TREE_LANG_FLAG_1 (TYPE)
@@ -56,18 +50,6 @@ struct GTY(()) lang_decl {
and C_RID_YYCODE is the token number wanted by Yacc. */
#define C_IS_RESERVED_WORD(ID) TREE_LANG_FLAG_0 (ID)
-struct GTY(()) lang_type {
- /* In a RECORD_TYPE, a sorted array of the fields of the type. */
- struct sorted_fields_type * GTY ((reorder ("resort_sorted_fields"))) s;
- /* In an ENUMERAL_TYPE, the min and max values. */
- tree enum_min;
- tree enum_max;
- /* In a RECORD_TYPE, information specific to Objective-C, such
- as a list of adopted protocols or a pointer to a corresponding
- @interface. See objc/objc-act.h for details. */
- tree objc_info;
-};
-
/* Record whether a type or decl was written with nonconstant size.
Note that TYPE_SIZE may have simplified to a constant. */
#define C_TYPE_VARIABLE_SIZE(TYPE) TYPE_LANG_FLAG_1 (TYPE)
@@ -382,22 +364,6 @@ struct c_parm {
struct c_declarator *declarator;
};
-/* Save and restore the variables in this file and elsewhere
- that keep track of the progress of compilation of the current function.
- Used for nested functions. */
-
-struct GTY(()) language_function {
- struct c_language_function base;
- tree x_break_label;
- tree x_cont_label;
- struct c_switch * GTY((skip)) x_switch_stack;
- struct c_arg_info * GTY((skip)) arg_info;
- int returns_value;
- int returns_null;
- int returns_abnormally;
- int warn_about_return_type;
-};
-
/* Used when parsing an enum. Initialized by start_enum. */
struct c_enum_contents
{
@@ -444,7 +410,6 @@ extern void c_bindings_end_stmt_expr (struct c_spot_bindings *);
extern void record_inline_static (location_t, tree, tree,
enum c_inline_static_type);
extern void c_init_decl_processing (void);
-extern void c_dup_lang_specific_decl (tree);
extern void c_print_identifier (FILE *, tree, int);
extern int quals_from_declspecs (const struct c_declspecs *);
extern struct c_declarator *build_array_declarator (location_t, tree,
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 01cdcd2..abd7880 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "langhooks.h"
#include "c-tree.h"
+#include "c-lang.h"
#include "tm_p.h"
#include "flags.h"
#include "output.h"
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index 1b1e6fa..7bc6a9e 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -1741,6 +1741,8 @@ get_output_file_with_visibility (const char *input_file)
headers with source files (and their special purpose gt-*.h headers). */
else if (strcmp (basename, "c-common.h") == 0)
output_name = "gt-c-common.h", for_name = "c-common.c";
+ else if (strcmp (basename, "c-lang.h") == 0)
+ output_name = "gt-c-decl.h", for_name = "c-decl.c";
else if (strcmp (basename, "c-tree.h") == 0)
output_name = "gt-c-decl.h", for_name = "c-decl.c";
else if (strncmp (basename, "cp", 2) == 0 && IS_DIR_SEPARATOR (basename[2])
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index 55065e3..f1b5722 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-20 Richard Guenther <rguenther@suse.de>
+
+ * objc-act.c: Include c-lang.h
+ * Make-lang.in (objc/objc-act.o): Add c-lang.h dependency.
+
2009-07-17 Aldy Hernandez <aldyh@redhat.com>
Manuel López-Ibáñez <manu@gcc.gnu.org>
diff --git a/gcc/objc/Make-lang.in b/gcc/objc/Make-lang.in
index fad506b..a098497 100644
--- a/gcc/objc/Make-lang.in
+++ b/gcc/objc/Make-lang.in
@@ -79,7 +79,7 @@ objc/objc-act.o : objc/objc-act.c \
$(EXPR_H) $(TARGET_H) $(C_TREE_H) $(DIAGNOSTIC_H) toplev.h $(FLAGS_H) \
objc/objc-act.h input.h $(FUNCTION_H) output.h debug.h langhooks.h \
$(LANGHOOKS_DEF_H) $(HASHTAB_H) $(C_PRAGMA_H) gt-objc-objc-act.h \
- $(GIMPLE_H)
+ $(GIMPLE_H) c-lang.h
objc.srcextra:
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index c110c79..8b1a596 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -52,6 +52,7 @@ along with GCC; see the file COPYING3. If not see
#include "cp-tree.h"
#else
#include "c-tree.h"
+#include "c-lang.h"
#endif
#include "c-common.h"