Update other targets.
* c-common.c: Don't include c-lex.h.
(builtin_define_with_value): Make static and prototype.
(builtin_define_std): Move from c-lex.h.
* c-common.h (init_c_lex): Move from c-lex.h.
* c-decl.c: Don't include c-lex.h.
(make_pointer_declarator): Move from c-parse.in.
* c-lex.c: Don't include c-lex.h.
* c-lex.h: Remove.
* c-parse.in: Don't include c-lex.h; include c-pragma.h.
(make_pointer_declarator): Move to c-decl.c.
* c-pragma.c: Don't include c-lex.h.
* c-pragma.h (yydebug, YYDEBUG, parse_in, c_lex): Move from c-lex.h.
* c-tree.h (make_pointer_declarator): New.
cp:
* lex.c: Don't include c-lex.h.
* parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
doc:
* passes.texi, tm.texi: Update.
objc:
* Make-lang.in: Update and correct.
* objc-act.c: Don't include c-lex.h or cpplib.h.
treelang:
* treetree.c: Don't include c-lex.h.
config:
* darwin-c.c: Don't include c-lex.h.
* c4x/c4x-c.c: Don't include c-lex.h.
* c4x/t-c4x: Update.
* i370/i370-c.c: Don't include c-lex.h.
* i370/t-i370: Update.
* i960/i960-c.c: Don't include c-lex.h.
* i960/i960.c: Don't include cpplib.h, c-lex.h or c-pragma.h.
* i960/t-960bare: Update.
* i960/t-vxworks: Update.
* rs6000/rs6000-c.c: Don't include c-lex.h; include c-pragma.h.
* rs6000/t-darwin: Update.
* rs6000/t-rs6000-c-rule: Update.
* v850/v850-c.c: Don't include c-lex.h.
* v850/v850.c: Don't include c-lex.h or cpplib.h.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53876
138bc75d-0d04-0410-961f-
82ee72b054a4
+2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * Makefile.in (C_COMMON_H): Fix.
+ Update other targets.
+ * c-common.c: Don't include c-lex.h.
+ (builtin_define_with_value): Make static and prototype.
+ (builtin_define_std): Move from c-lex.h.
+ * c-common.h (init_c_lex): Move from c-lex.h.
+ * c-decl.c: Don't include c-lex.h.
+ (make_pointer_declarator): Move from c-parse.in.
+ * c-lex.c: Don't include c-lex.h.
+ * c-lex.h: Remove.
+ * c-parse.in: Don't include c-lex.h; include c-pragma.h.
+ (make_pointer_declarator): Move to c-decl.c.
+ * c-pragma.c: Don't include c-lex.h.
+ * c-pragma.h (yydebug, YYDEBUG, parse_in, c_lex): Move from c-lex.h.
+ * c-tree.h (make_pointer_declarator): New.
+doc:
+ * passes.texi, tm.texi: Update.
+objc:
+ * Make-lang.in: Update and correct.
+ * objc-act.c: Don't include c-lex.h or cpplib.h.
+treelang:
+ * treetree.c: Don't include c-lex.h.
+config:
+ * darwin-c.c: Don't include c-lex.h.
+ * c4x/c4x-c.c: Don't include c-lex.h.
+ * c4x/t-c4x: Update.
+ * i370/i370-c.c: Don't include c-lex.h.
+ * i370/t-i370: Update.
+ * i960/i960-c.c: Don't include c-lex.h.
+ * i960/i960.c: Don't include cpplib.h, c-lex.h or c-pragma.h.
+ * i960/t-960bare: Update.
+ * i960/t-vxworks: Update.
+ * rs6000/rs6000-c.c: Don't include c-lex.h; include c-pragma.h.
+ * rs6000/t-darwin: Update.
+ * rs6000/t-rs6000-c-rule: Update.
+ * v850/v850-c.c: Don't include c-lex.h.
+ * v850/v850.c: Don't include c-lex.h or cpplib.h.
+
+
2002-05-25 Kazu Hirata <kazu@cs.umass.edu>
* tree.def: Fix typos.
GGC_H = ggc.h varray.h
TIMEVAR_H = timevar.h timevar.def
INSN_ATTR_H = insn-attr.h $(srcdir)/insn-addr.h $(srcdir)/varray.h
-C_COMMON_H = c-common.h $(SPLAY_TREE_H)
+C_COMMON_H = c-common.h $(SPLAY_TREE_H) $(CPPLIB_H)
C_TREE_H = c-tree.h $(C_COMMON_H)
SYSTEM_H = system.h hwint.h $(srcdir)/../include/libiberty.h
PREDICT_H = predict.h predict.def
c-errors.o: c-errors.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) flags.h \
diagnostic.h $(TM_P_H)
-c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h $(GGC_H) intl.h \
+c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) $(GGC_H) intl.h \
$(C_TREE_H) input.h flags.h $(SYSTEM_H) toplev.h output.h $(CPPLIB_H)
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-c $(srcdir)/c-parse.c $(OUTPUT_OPTION)
$(SHELL) $(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y
c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) $(C_TREE_H) \
- $(GGC_H) $(TARGET_H) c-lex.h flags.h function.h output.h $(EXPR_H) \
+ $(GGC_H) $(TARGET_H) flags.h function.h output.h $(EXPR_H) \
debug.h toplev.h intl.h $(TM_P_H) tree-inline.h $(TIMEVAR_H) c-pragma.h
c-typeck.o : c-typeck.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
$(TARGET_H) flags.h intl.h output.h $(EXPR_H) $(RTL_H) toplev.h $(TM_P_H)
c-lang.o : c-lang.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
langhooks.h $(LANGHOOKS_DEF_H) c-common.h
-c-lex.o : c-lex.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) c-lex.h \
+c-lex.o : c-lex.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) \
debug.h $(C_TREE_H) c-common.h \
c-pragma.h input.h intl.h flags.h toplev.h output.h \
mbchar.h $(CPPLIB_H) $(EXPR_H) $(TM_P_H)
$(C_COMMON_H) flags.h toplev.h intl.h diagnostic.h
c-semantics.o : c-semantics.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
- c-lex.h flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
+ flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
$(EXPR_H) $(PREDICT_H)
# Language-independent files.
#include "diagnostic.h"
#include "tm_p.h"
#include "obstack.h"
-#include "c-lex.h"
#include "cpplib.h"
#include "target.h"
#include "langhooks.h"
#include "except.h" /* For USING_SJLJ_EXCEPTIONS. */
-cpp_reader *parse_in; /* Declared in c-lex.h. */
+
+cpp_reader *parse_in; /* Declared in c-pragma.h. */
/* We let tm.h override the types used here, to handle trivial differences
such as the choice of unsigned int or long unsigned int for size_t.
static bool nonnull_check_p PARAMS ((tree, unsigned HOST_WIDE_INT));
static bool get_nonnull_operand PARAMS ((tree,
unsigned HOST_WIDE_INT *));
+void builtin_define_std PARAMS ((const char *));
+static void builtin_define_with_value PARAMS ((const char *, const char *,
+ int));
/* Table of machine-independent attributes common to all C-like languages. */
const struct attribute_spec c_common_attribute_table[] =
/* A straightforward target hook doesn't work, because of problems
linking that hook's body when part of non-C front ends. */
# define preprocessing_asm_p() (cpp_get_options (pfile)->lang == CLK_ASM)
+# define builtin_define(TXT) cpp_define (pfile, TXT)
+# define builtin_assert(TXT) cpp_assert (pfile, TXT)
TARGET_CPU_CPP_BUILTINS ();
TARGET_OS_CPP_BUILTINS ();
}
/* Pass an object-like macro and a value to define it to. The third
parameter says whether or not to turn the value into a string
constant. */
-void
+static void
builtin_define_with_value (macro, expansion, is_str)
const char *macro;
const char *expansion;
extern int c_common_unsafe_for_reeval PARAMS ((tree));
+extern const char *init_c_lex PARAMS ((const char *));
+
/* Information recorded about each file examined during compilation. */
struct c_fileinfo
#include "output.h"
#include "expr.h"
#include "c-tree.h"
-#include "c-lex.h"
#include "toplev.h"
#include "ggc.h"
#include "tm_p.h"
tree t = build_tree_list (NULL_TREE, void_type_node);
return t;
}
+
+/* Return something to represent absolute declarators containing a *.
+ TARGET is the absolute declarator that the * contains.
+ TYPE_QUALS_ATTRS is a list of modifiers such as const or volatile
+ to apply to the pointer type, represented as identifiers, possible mixed
+ with attributes.
+
+ We return an INDIRECT_REF whose "contents" are TARGET (inside a TREE_LIST,
+ if attributes are present) and whose type is the modifier list. */
+
+tree
+make_pointer_declarator (type_quals_attrs, target)
+ tree type_quals_attrs, target;
+{
+ tree quals, attrs;
+ tree itarget = target;
+ split_specs_attrs (type_quals_attrs, &quals, &attrs);
+ if (attrs != NULL_TREE)
+ itarget = tree_cons (attrs, target, NULL_TREE);
+ return build1 (INDIRECT_REF, quals, itarget);
+}
#include "expr.h"
#include "input.h"
#include "output.h"
-#include "c-lex.h"
#include "c-tree.h"
#include "c-common.h"
#include "flags.h"
+++ /dev/null
-/* Define constants for communication with c-parse.y.
- Copyright (C) 1987, 1992, 1998, 1999, 2000 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 2, 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 COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
-
-#ifndef GCC_C_LEX_H
-#define GCC_C_LEX_H
-
-/* Cause the `yydebug' variable to be defined. */
-#define YYDEBUG 1
-extern int yydebug;
-
-extern tree make_pointer_declarator PARAMS ((tree, tree));
-
-extern int c_lex PARAMS ((tree *));
-extern const char *init_c_lex PARAMS ((const char *));
-
-struct cpp_reader;
-extern struct cpp_reader* parse_in;
-
-#define builtin_define(TXT) cpp_define (pfile, TXT)
-#define builtin_assert(TXT) cpp_assert (pfile, TXT)
-
-/* Pass an object-like macro. If it doesn't lie in the user's
- namespace, defines it unconditionally. Otherwise define a version
- with two leading underscores, and another version with two leading
- and trailing underscores, and define the original only if an ISO
- standard was not nominated.
-
- e.g. passing "unix" defines "__unix", "__unix__" and possibly
- "unix". Passing "_mips" defines "__mips", "__mips__" and possibly
- "_mips". */
-extern void builtin_define_std PARAMS ((const char *));
-
-/* Pass an object-like macro and a value to define it to. The third
- parameter says whether or not to turn the value into a string
- constant. */
-extern void builtin_define_with_value PARAMS ((const char *, const char *,
- int));
-
-#endif /* ! GCC_C_LEX_H */
#include "cpplib.h"
#include "intl.h"
#include "timevar.h"
-#include "c-lex.h" /* Gets YYDEBUG macro. */
+#include "c-pragma.h" /* For YYDEBUG definition, and parse_in. */
#include "c-tree.h"
-#include "c-pragma.h"
#include "flags.h"
#include "output.h"
#include "toplev.h"
/* This is not the ideal place to put these, but we have to get them out
of c-lex.c because cp/lex.c has its own versions. */
-/* Return something to represent absolute declarators containing a *.
- TARGET is the absolute declarator that the * contains.
- TYPE_QUALS_ATTRS is a list of modifiers such as const or volatile
- to apply to the pointer type, represented as identifiers, possible mixed
- with attributes.
-
- We return an INDIRECT_REF whose "contents" are TARGET (inside a TREE_LIST,
- if attributes are present) and whose type is the modifier list. */
-
-tree
-make_pointer_declarator (type_quals_attrs, target)
- tree type_quals_attrs, target;
-{
- tree quals, attrs;
- tree itarget = target;
- split_specs_attrs (type_quals_attrs, &quals, &attrs);
- if (attrs != NULL_TREE)
- itarget = tree_cons (attrs, target, NULL_TREE);
- return build1 (INDIRECT_REF, quals, itarget);
-}
-
/* Free malloced parser stacks if necessary. */
void
#include "flags.h"
#include "toplev.h"
#include "ggc.h"
-#include "c-lex.h"
#include "c-common.h"
#include "output.h"
#include "tm_p.h"
#ifndef GCC_C_PRAGMA_H
#define GCC_C_PRAGMA_H
+/* Cause the `yydebug' variable to be defined. */
+#define YYDEBUG 1
+extern int yydebug;
+
+struct cpp_reader;
+extern struct cpp_reader* parse_in;
+
#ifdef HANDLE_SYSV_PRAGMA
#if ((defined (ASM_WEAKEN_LABEL) && defined (ASM_OUTPUT_WEAK_ALIAS)) \
|| defined (ASM_WEAKEN_DECL))
extern void maybe_apply_pragma_weak PARAMS ((tree));
extern tree maybe_apply_renaming_pragma PARAMS ((tree, tree));
+extern int c_lex PARAMS ((tree *));
+
#endif /* GCC_C_PRAGMA_H */
extern tree c_begin_compound_stmt PARAMS ((void));
extern void c_expand_deferred_function PARAMS ((tree));
extern void c_expand_decl_stmt PARAMS ((tree));
-
+extern tree make_pointer_declarator PARAMS ((tree, tree));
/* in c-objc-common.c */
extern int c_disregard_inline_limits PARAMS ((tree));
#include "toplev.h"
#include "cpplib.h"
#include "c-pragma.h"
-#include "c-lex.h"
#include "c4x-protos.h"
static int c4x_parse_pragma PARAMS ((const char *, tree *, tree *));
TARGET_LIBGCC2_CFLAGS = -Dexit=unused_exit
c4x-c.o: $(srcdir)/config/c4x/c4x-c.c $(srcdir)/config/c4x/c4x-protos.h \
- $(CONFIG_H) $(SYSTEM_H) cpplib.h $(TREE_H) c-pragma.h c-lex.h toplev.h
+ $(CONFIG_H) $(SYSTEM_H) cpplib.h $(TREE_H) c-pragma.h toplev.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
MULTILIB_OPTIONS = m30 msmall mmemparm
#include "cpplib.h"
#include "tree.h"
#include "c-pragma.h"
-#include "c-lex.h"
#include "c-tree.h"
#include "toplev.h"
#include "tm_p.h"
#include "toplev.h"
#include "cpplib.h"
#include "c-pragma.h"
-#include "c-lex.h"
#include "i370-protos.h"
#ifdef TARGET_HLASM
i370-c.o: $(srcdir)/config/i370/i370-c.c $(srcdir)/config/i370/i370-protos.h \
- $(CONFIG_H) $(SYSTEM_H) cpplib.h $(TREE_H) c-pragma.h c-lex.h toplev.h
+ $(CONFIG_H) $(SYSTEM_H) cpplib.h $(TREE_H) c-pragma.h toplev.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
#include "cpplib.h"
#include "tree.h"
#include "c-pragma.h"
-#include "c-lex.h"
#include "toplev.h"
#include "ggc.h"
#include "tm_p.h"
#include "function.h"
#include "recog.h"
#include "toplev.h"
-#include "cpplib.h"
-#include "c-pragma.h"
-#include "c-lex.h"
#include "tm_p.h"
#include "target.h"
#include "target-def.h"
cat $(srcdir)/config/fp-bit.c >> xp-bit.c
i960-c.o: $(srcdir)/config/i960/i960-c.c $(CONFIG_H) $(SYSTEM_H) cpplib.h \
- $(TREE_H) c-pragma.h c-lex.h toplev.h $(GGC_H) $(TM_P_H)
+ $(TREE_H) c-pragma.h toplev.h $(GGC_H) $(TM_P_H)
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
MULTILIB_OPTIONS=mnumerics/msoft-float mlong-double-64
cat $(srcdir)/config/fp-bit.c >> xp-bit.c
i960-c.o: $(srcdir)/config/i960/i960-c.c $(CONFIG_H) $(SYSTEM_H) cpplib.h \
- $(TREE_H) c-pragma.h c-lex.h toplev.h $(GGC_H) $(TM_P_H)
+ $(TREE_H) c-pragma.h toplev.h $(GGC_H) $(TM_P_H)
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
MULTILIB_OPTIONS=mnumerics/msoft-float mlong-double-64
#include "system.h"
#include "cpplib.h"
#include "tree.h"
-#include "c-lex.h"
+#include "c-pragma.h"
#include "errors.h"
#include "tm_p.h"
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
darwin-c.o: $(srcdir)/config/darwin-c.c $(CONFIG_H) $(SYSTEM_H) \
- $(TREE_H) $(C_TREE_H) c-lex.h c-pragma.h toplev.h cpplib.h \
- $(TM_P_H)
+ $(TREE_H) $(C_TREE_H) c-pragma.h toplev.h cpplib.h $(TM_P_H)
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
# Build the libraries for both hard and soft floating point
rs6000-c.o: $(srcdir)/config/rs6000/rs6000-c.c \
$(srcdir)/config/rs6000/rs6000-protos.h \
- $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(CPPLIB_H) $(TM_P_H) c-lex.h errors.h
+ $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(CPPLIB_H) $(TM_P_H) c-pragma.h errors.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
#include "cpplib.h"
#include "tree.h"
#include "c-pragma.h"
-#include "c-lex.h"
#include "toplev.h"
#include "ggc.h"
#include "tm_p.h"
#include "expr.h"
#include "function.h"
#include "toplev.h"
-#include "cpplib.h"
-#include "c-lex.h"
#include "ggc.h"
#include "integrate.h"
#include "tm_p.h"
+2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * lex.c: Don't include c-lex.h.
+ * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
+
2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
* spew.c (yyungetc, snarf_block): Remove indent_level handling.
#include "tree.h"
#include "cp-tree.h"
#include "cpplib.h"
-#include "c-lex.h"
#include "lex.h"
#include "parse.h"
#include "flags.h"
#include "flags.h"
#include "cp-tree.h"
#include "lex.h"
-#include "c-lex.h" /* For YYDEBUG definition. */
+#include "c-pragma.h" /* For YYDEBUG definition. */
#include "output.h"
#include "except.h"
#include "toplev.h"
#include "tree.h"
#include "cp-tree.h"
#include "cpplib.h"
-#include "c-lex.h"
+#include "c-pragma.h"
#include "lex.h"
#include "parse.h"
#include "flags.h"
along with header files
@file{c-common.h},
@file{c-dump.h},
-@file{c-lex.h},
and
@file{c-pragma.h},
are also used for all of the above languages.
This function-like macro expands to a block of code that defines
built-in preprocessor macros and assertions for the target cpu, using
the functions @code{builtin_define}, @code{builtin_define_std} and
-@code{builtin_assert} declared in @file{c-lex.h}. When the front end
+@code{builtin_assert} defined in @file{c-common.c}. When the front end
calls this macro it provides a trailing semicolon, and since it has
finished command line option processing your code can use those
results freely.
-c $(srcdir)/objc/objc-lang.c $(OUTPUT_OPTION)
objc-parse.o : $(srcdir)/objc/objc-parse.c \
- $(CONFIG_H) $(TREE_H) $(srcdir)/toplev.h $(srcdir)/ggc.h \
- $(srcdir)/c-lex.h $(srcdir)/c-tree.h $(srcdir)/c-common.h \
+ $(CONFIG_H) $(TREE_H) $(C_COMMON_H) $(srcdir)/toplev.h $(srcdir)/ggc.h \
+ $(srcdir)/c-pragma.h $(srcdir)/c-tree.h \
$(srcdir)/input.h $(srcdir)/flags.h $(srcdir)/output.h \
- $(srcdir)/objc/objc-act.h $(SYSTEM_H) $(CPPLIB_H)
+ $(srcdir)/objc/objc-act.h $(SYSTEM_H)
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/objc \
-c $(srcdir)/objc/objc-parse.c $(OUTPUT_OPTION)
objc-act.o : $(srcdir)/objc/objc-act.c \
$(CONFIG_H) $(TREE_H) $(RTL_H) $(SYSTEM_H) $(EXPR_H) $(TARGET_H) \
- $(srcdir)/c-tree.h $(srcdir)/c-common.h $(srcdir)/c-lex.h \
+ $(C_COMMON_H) $(srcdir)/c-tree.h \
$(srcdir)/toplev.h $(srcdir)/flags.h $(srcdir)/objc/objc-act.h \
$(srcdir)/input.h $(srcdir)/function.h $(srcdir)/output.h $(srcdir)/debug.h \
$(srcdir)/langhooks.h $(LANGHOOKS_DEF_H)
#include "rtl.h"
#include "expr.h"
#include "c-tree.h"
-#include "c-lex.h"
#include "c-common.h"
#include "flags.h"
#include "objc-act.h"
#include "output.h"
#include "toplev.h"
#include "ggc.h"
-#include "cpplib.h"
#include "debug.h"
#include "target.h"
#include "tree.h"
#include "flags.h"
#include "output.h"
-#include "c-lex.h"
#include "c-tree.h"
#include "rtl.h"
#include "tm_p.h"