diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 891d678648e..9849c73315a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,44 @@ +2002-05-25 Neil Booth + + * 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 * tree.def: Fix typos. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index d33d2e6c09d..10dcfa855e4 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -569,7 +569,7 @@ GCC_H = gcc.h version.h 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 @@ -1141,7 +1141,7 @@ s-crt0: $(CRT0_S) $(MCRT0_S) $(GCC_PASSES) $(CONFIG_H) 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) @@ -1164,13 +1164,13 @@ $(srcdir)/c-parse.y: c-parse.in $(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) @@ -1240,7 +1240,7 @@ c-format.o : c-format.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) langhooks.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. diff --git a/gcc/c-common.c b/gcc/c-common.c index 006a831cf3c..15b95475d9a 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -34,12 +34,12 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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. @@ -359,6 +359,9 @@ static void check_nonnull_arg PARAMS ((void *, tree, 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[] = @@ -4401,6 +4404,8 @@ cb_register_builtins (pfile) /* 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 (); } @@ -4451,7 +4456,7 @@ builtin_define_std (macro) /* 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; diff --git a/gcc/c-common.h b/gcc/c-common.h index 834d78520dc..aab0e33253e 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -896,6 +896,8 @@ extern int c_staticp PARAMS ((tree)); 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 diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 3dcb05540ec..223f905c3f6 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -37,7 +37,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "output.h" #include "expr.h" #include "c-tree.h" -#include "c-lex.h" #include "toplev.h" #include "ggc.h" #include "tm_p.h" @@ -7289,3 +7288,24 @@ build_void_list_node () 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); +} diff --git a/gcc/c-lex.c b/gcc/c-lex.c index 7e82b0363ac..292c267b312 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -27,7 +27,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "expr.h" #include "input.h" #include "output.h" -#include "c-lex.h" #include "c-tree.h" #include "c-common.h" #include "flags.h" diff --git a/gcc/c-lex.h b/gcc/c-lex.h deleted file mode 100644 index 51538ab5ebf..00000000000 --- a/gcc/c-lex.h +++ /dev/null @@ -1,56 +0,0 @@ -/* 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 */ diff --git a/gcc/c-parse.in b/gcc/c-parse.in index 70bcb0ce8c9..78a53869dd7 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -43,9 +43,8 @@ end ifc #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" @@ -3933,27 +3932,6 @@ yyprint (file, yychar, yyl) /* 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 diff --git a/gcc/c-pragma.c b/gcc/c-pragma.c index d5df3559597..8801c697a8c 100644 --- a/gcc/c-pragma.c +++ b/gcc/c-pragma.c @@ -29,7 +29,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "flags.h" #include "toplev.h" #include "ggc.h" -#include "c-lex.h" #include "c-common.h" #include "output.h" #include "tm_p.h" diff --git a/gcc/c-pragma.h b/gcc/c-pragma.h index 22e4f7a174d..8e7589f1fdd 100644 --- a/gcc/c-pragma.h +++ b/gcc/c-pragma.h @@ -22,6 +22,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #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)) @@ -56,4 +63,6 @@ extern void cpp_register_pragma PARAMS ((cpp_reader *, 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 */ diff --git a/gcc/c-tree.h b/gcc/c-tree.h index 8ed0b642b90..77eeb3e4c54 100644 --- a/gcc/c-tree.h +++ b/gcc/c-tree.h @@ -227,7 +227,7 @@ extern tree xref_tag PARAMS ((enum tree_code, tree)); 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)); diff --git a/gcc/config/c4x/c4x-c.c b/gcc/config/c4x/c4x-c.c index 3bbf184e174..5a680f554d9 100644 --- a/gcc/config/c4x/c4x-c.c +++ b/gcc/config/c4x/c4x-c.c @@ -28,7 +28,6 @@ Boston, MA 02111-1307, USA. */ #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 *)); diff --git a/gcc/config/c4x/t-c4x b/gcc/config/c4x/t-c4x index 394b4c95738..aee0a7bb339 100644 --- a/gcc/config/c4x/t-c4x +++ b/gcc/config/c4x/t-c4x @@ -8,7 +8,7 @@ LIB1ASMFUNCS = _divsf3 _divsi3 _udivsi3 _umodsi3 _modsi3 _mulsi3 \ 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 diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c index 10ffaf09935..8081f0fe2a7 100644 --- a/gcc/config/darwin-c.c +++ b/gcc/config/darwin-c.c @@ -25,7 +25,6 @@ Boston, MA 02111-1307, USA. */ #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" diff --git a/gcc/config/i370/i370-c.c b/gcc/config/i370/i370-c.c index d1eddb6a971..d2344bc0108 100644 --- a/gcc/config/i370/i370-c.c +++ b/gcc/config/i370/i370-c.c @@ -28,7 +28,6 @@ Boston, MA 02111-1307, USA. */ #include "toplev.h" #include "cpplib.h" #include "c-pragma.h" -#include "c-lex.h" #include "i370-protos.h" #ifdef TARGET_HLASM diff --git a/gcc/config/i370/t-i370 b/gcc/config/i370/t-i370 index c92ebed33f1..049d84f6db9 100644 --- a/gcc/config/i370/t-i370 +++ b/gcc/config/i370/t-i370 @@ -1,3 +1,3 @@ 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) $< diff --git a/gcc/config/i960/i960-c.c b/gcc/config/i960/i960-c.c index 66ff29cfcaf..b6a9b749d0c 100644 --- a/gcc/config/i960/i960-c.c +++ b/gcc/config/i960/i960-c.c @@ -27,7 +27,6 @@ Boston, MA 02111-1307, USA. */ #include "cpplib.h" #include "tree.h" #include "c-pragma.h" -#include "c-lex.h" #include "toplev.h" #include "ggc.h" #include "tm_p.h" diff --git a/gcc/config/i960/i960.c b/gcc/config/i960/i960.c index 6f29fdceea0..85893de63ff 100644 --- a/gcc/config/i960/i960.c +++ b/gcc/config/i960/i960.c @@ -40,9 +40,6 @@ Boston, MA 02111-1307, USA. */ #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" diff --git a/gcc/config/i960/t-960bare b/gcc/config/i960/t-960bare index d837eda5feb..7c243643cb0 100644 --- a/gcc/config/i960/t-960bare +++ b/gcc/config/i960/t-960bare @@ -19,7 +19,7 @@ xp-bit.c: $(srcdir)/config/fp-bit.c 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 diff --git a/gcc/config/i960/t-vxworks960 b/gcc/config/i960/t-vxworks960 index 00375cbf0ac..0c5f40fdbf5 100644 --- a/gcc/config/i960/t-vxworks960 +++ b/gcc/config/i960/t-vxworks960 @@ -22,7 +22,7 @@ xp-bit.c: $(srcdir)/config/fp-bit.c 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 diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c index 33ce2a1420d..15cd5a6c338 100644 --- a/gcc/config/rs6000/rs6000-c.c +++ b/gcc/config/rs6000/rs6000-c.c @@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA. */ #include "system.h" #include "cpplib.h" #include "tree.h" -#include "c-lex.h" +#include "c-pragma.h" #include "errors.h" #include "tm_p.h" diff --git a/gcc/config/rs6000/t-darwin b/gcc/config/rs6000/t-darwin index c9c392e1453..5839efa0cd2 100644 --- a/gcc/config/rs6000/t-darwin +++ b/gcc/config/rs6000/t-darwin @@ -20,8 +20,7 @@ darwin.o: $(srcdir)/config/darwin.c $(CONFIG_H) $(SYSTEM_H) $(RTL_BASE_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 diff --git a/gcc/config/rs6000/t-rs6000-c-rule b/gcc/config/rs6000/t-rs6000-c-rule index 3be9d67304d..a768fb5b0ea 100644 --- a/gcc/config/rs6000/t-rs6000-c-rule +++ b/gcc/config/rs6000/t-rs6000-c-rule @@ -1,4 +1,4 @@ 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) diff --git a/gcc/config/v850/v850-c.c b/gcc/config/v850/v850-c.c index 32f4882dd87..8f43930fc5a 100644 --- a/gcc/config/v850/v850-c.c +++ b/gcc/config/v850/v850-c.c @@ -24,7 +24,6 @@ Boston, MA 02111-1307, USA. */ #include "cpplib.h" #include "tree.h" #include "c-pragma.h" -#include "c-lex.h" #include "toplev.h" #include "ggc.h" #include "tm_p.h" diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c index e65dae596cb..c5e3d980358 100644 --- a/gcc/config/v850/v850.c +++ b/gcc/config/v850/v850.c @@ -36,8 +36,6 @@ Boston, MA 02111-1307, USA. */ #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" diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 60591ed4385..0d56ed8f1a9 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2002-05-25 Neil Booth + + * 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 * spew.c (yyungetc, snarf_block): Remove indent_level handling. diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index a2b0dd3df57..7be5acbd372 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -29,7 +29,6 @@ Boston, MA 02111-1307, USA. */ #include "tree.h" #include "cp-tree.h" #include "cpplib.h" -#include "c-lex.h" #include "lex.h" #include "parse.h" #include "flags.h" diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y index 07549107c61..b6abd0bfe7a 100644 --- a/gcc/cp/parse.y +++ b/gcc/cp/parse.y @@ -37,7 +37,7 @@ Boston, MA 02111-1307, USA. */ #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" diff --git a/gcc/cp/spew.c b/gcc/cp/spew.c index 0d555fca067..c1aa9543899 100644 --- a/gcc/cp/spew.c +++ b/gcc/cp/spew.c @@ -29,7 +29,7 @@ Boston, MA 02111-1307, USA. */ #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" diff --git a/gcc/doc/passes.texi b/gcc/doc/passes.texi index cdc694bf5c3..a8eb303e390 100644 --- a/gcc/doc/passes.texi +++ b/gcc/doc/passes.texi @@ -116,7 +116,6 @@ and 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. diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index fd912c70792..f82fd609908 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -588,7 +588,7 @@ Here are run-time target specifications. 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. diff --git a/gcc/objc/Make-lang.in b/gcc/objc/Make-lang.in index 379a16cfdbb..da26dba52b3 100644 --- a/gcc/objc/Make-lang.in +++ b/gcc/objc/Make-lang.in @@ -63,10 +63,10 @@ objc-lang.o : $(srcdir)/objc/objc-lang.c \ -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) @@ -90,7 +90,7 @@ $(srcdir)/objc/objc-parse.y: $(srcdir)/c-parse.in 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) diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 4795160f09f..132c28e8e07 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -45,7 +45,6 @@ Boston, MA 02111-1307, USA. */ #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" @@ -55,7 +54,6 @@ Boston, MA 02111-1307, USA. */ #include "output.h" #include "toplev.h" #include "ggc.h" -#include "cpplib.h" #include "debug.h" #include "target.h" diff --git a/gcc/treelang/treetree.c b/gcc/treelang/treetree.c index fddd7721def..2cb57ff3237 100644 --- a/gcc/treelang/treetree.c +++ b/gcc/treelang/treetree.c @@ -76,7 +76,6 @@ #include "tree.h" #include "flags.h" #include "output.h" -#include "c-lex.h" #include "c-tree.h" #include "rtl.h" #include "tm_p.h"