diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2002-12-16 18:23:00 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2002-12-16 18:23:00 +0000 |
commit | 4977bab6ed59f01c73f9c8b9e92298706df9b6d5 (patch) | |
tree | c259697c448b0c6f548f153c48c46a8d7a75970f /gcc/treelang | |
parent | b51dc045004ee7eb8d2bf4358ddf22a6cc6c1d00 (diff) | |
download | gcc-4977bab6ed59f01c73f9c8b9e92298706df9b6d5.zip gcc-4977bab6ed59f01c73f9c8b9e92298706df9b6d5.tar.gz gcc-4977bab6ed59f01c73f9c8b9e92298706df9b6d5.tar.bz2 |
Merge basic-improvements-branch to trunk
From-SVN: r60174
Diffstat (limited to 'gcc/treelang')
-rw-r--r-- | gcc/treelang/ChangeLog | 30 | ||||
-rw-r--r-- | gcc/treelang/Make-lang.in | 30 | ||||
-rw-r--r-- | gcc/treelang/lex.l | 17 | ||||
-rw-r--r-- | gcc/treelang/parse.y | 14 | ||||
-rw-r--r-- | gcc/treelang/tree1.c | 11 | ||||
-rw-r--r-- | gcc/treelang/treetree.c | 17 |
6 files changed, 50 insertions, 69 deletions
diff --git a/gcc/treelang/ChangeLog b/gcc/treelang/ChangeLog index 138a96d..4e77901 100644 --- a/gcc/treelang/ChangeLog +++ b/gcc/treelang/ChangeLog @@ -1,11 +1,27 @@ +2002-11-30 Zack Weinberg <zack@codesourcery.com> + + * lex.l: Move "%{" below copyright notice; get rid of "/*" + embedded in comment. Do not #undef IN_GCC; do not include + stdio.h, memory.h, or ansidecl.h; do not include config.h twice. + Do include coretypes.h and tm.h. + * parse.y: Do not #undef IN_GCC, provide bogus definitions of tree + and rtx typedefs, or include stdio.h, stdlib.h, string.h, or + ansidecl.h. Do include coretypes.h and tm.h. + * tree1.c: Do not include ansidecl.h, stdlib.h, unistd.h, ctype.h, + stdarg.h, string.h, or stdio.h. Do include coretypes.h and tm.h. + * treetree.c: Do not include stdlib.h, unistd.h, safe-ctype.h, + errno.h. stdarg.h, limits.h, string.h, fcntl.h, getopt.h. stdio.h, + or ansidecl.h. Do include coretypes.h and tm.h. + * Make-lang.in: Update dependencies. + 2002-09-09 Tim Josling <tej@melbpc.org.au> * treetree.c (objc_is_id): New. 2002-08-16 Tim Josling <tej@melbpc.org.au> - Remove variables and functions now defined elsewhere. - + Remove variables and functions now defined elsewhere. + * treetree.c (maybe_objc_comptypes): Remove. (warn_format, warn_format_y2k, warn_format_extra_args, warn_format_nonliteral, warn_format_security, @@ -33,7 +49,7 @@ 2002-07-11 Tim Josling <tej@melbpc.org.au> - Remove front end hard coding from gengtype.c. + Remove front end hard coding from gengtype.c. * config-lang.in (gtfiles): Add files needed for this front end. @@ -41,7 +57,7 @@ 2002-07-09 Tim Josling <tej@melbpc.org.au> Support new attributes regime (Fix for PR c++/7099). - + * treetree.c (handle_format_attribute): Return NULL_TREE instead of aborting. (top level): Define LANG_HOOKS_COMMON_ATTRIBUTE_TABLE @@ -60,7 +76,7 @@ 2002-06-10 Tim Josling <tej@melbpc.org.au> - Cleanup + Cleanup * Make-lang.in (check-treelang). Add. Remove direct dependency of 'check' on 'treelang.check' as redundant. @@ -131,7 +147,7 @@ 2002-05-11 Tim Josling <tej@melbpc.org.au> * treetree.c: (cpp_define) Add. - (cpp_get_callbacks) Add. + (cpp_get_callbacks) Add. 2002-05-07 Tim Josling <tej@melbpc.org.au> @@ -161,4 +177,4 @@ 2001-05-11 Tim Josling <tej@melbpc.org.au> - Create the new language. + Create the new language. diff --git a/gcc/treelang/Make-lang.in b/gcc/treelang/Make-lang.in index a133767..79da1a6 100644 --- a/gcc/treelang/Make-lang.in +++ b/gcc/treelang/Make-lang.in @@ -90,22 +90,20 @@ tree1$(exeext): treelang/tree1.o treelang/treetree.o treelang/lex.o treelang/par # object file makes -treelang/tree1.o: $(srcdir)/treelang/tree1.c $(srcdir)/treelang/treelang.h \ - $(srcdir)/treelang/parse.h $(CONFIG_H) \ - gt-treelang-tree1.h gtype-treelang.h - $(CC) -o $@ -c $(ALL_CFLAGS) $(INCLUDES) $< - -treelang/treetree.o: $(srcdir)/treelang/treetree.c $(srcdir)/treelang/treetree.h \ - $(CONFIG_H) - $(CC) -o $@ -c $(ALL_CFLAGS) $(INCLUDES) $< - -treelang/parse.o: $(srcdir)/treelang/parse.c $(srcdir)/treelang/treelang.h \ - $(srcdir)/treelang/treetree.h $(CONFIG_H) - $(CC) -o $@ -c $(ALL_CFLAGS) $(INCLUDES) $< - -treelang/lex.o: $(srcdir)/treelang/lex.c $(srcdir)/treelang/parse.h \ - $(srcdir)/treelang/treelang.h $(CONFIG_H) - $(CC) -o $@ -c $(ALL_CFLAGS) $(INCLUDES) $< +treelang/tree1.o: treelang/tree1.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ + flags.h toplev.h $(GGC_H) $(TREE_H) diagnostic.h treelang/treelang.h \ + treelang/treetree.h gt-treelang-tree1.h gtype-treelang.h + +treelang/treetree.o: treelang/treetree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ + $(TM_H) $(TREE_H) flags.h output.h $(C_TREE_H) $(RTL_H) $(GGC_H) toplev.h \ + varray.h $(LANGHOOKS_DEF_H) langhooks.h treelang/treelang.h \ + treelang/treetree.h + +treelang/parse.o: treelang/parse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ + $(TM_H) diagnostic.h treelang/treelang.h treelang/treetree.h + +treelang/lex.o: treelang/lex.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ + $(TM_H) diagnostic.h $(TREE_H) treelang/treelang.h treelang/parse.h # generated files the files from lex and yacc are put into the source # directory in case someone wants to build but does not have diff --git a/gcc/treelang/lex.l b/gcc/treelang/lex.l index b1881dc..4ce755b 100644 --- a/gcc/treelang/lex.l +++ b/gcc/treelang/lex.l @@ -1,11 +1,11 @@ -%{ /* -*- c -*- = mode for emacs editor -/* +/* -*- c -*- = mode for emacs editor TREELANG lexical analysis --------------------------------------------------------------------- - Copyright (C) 1986, 87, 89, 92-96, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1986, 87, 89, 92-96, 1997, 1999, 2000, 2001, 2002 + Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the @@ -33,16 +33,11 @@ */ -#include <stdio.h> -#include <memory.h> -#include "ansidecl.h" +%{ #include "config.h" #include "system.h" - -/* Avoid poisoned malloc problem. */ -#undef IN_GCC - -#include "config.h" +#include "coretypes.h" +#include "tm.h" #include "diagnostic.h" #include "tree.h" diff --git a/gcc/treelang/parse.y b/gcc/treelang/parse.y index 7d7400f..1f8cf22 100644 --- a/gcc/treelang/parse.y +++ b/gcc/treelang/parse.y @@ -42,20 +42,10 @@ */ -/* Undefine IN_GCC so malloc etc work. The alternative is to redefine - the out of stack routine in bison. */ -#undef IN_GCC -/* Front ends should not have to see these, but config.h needs everything. */ -typedef void *tree; -typedef void *rtx; - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "ansidecl.h" #include "config.h" #include "system.h" +#include "coretypes.h" +#include "tm.h" #include "diagnostic.h" #include "treelang.h" diff --git a/gcc/treelang/tree1.c b/gcc/treelang/tree1.c index bc54710..1bd4689 100644 --- a/gcc/treelang/tree1.c +++ b/gcc/treelang/tree1.c @@ -33,7 +33,8 @@ #include "config.h" #include "system.h" -#include "ansidecl.h" +#include "coretypes.h" +#include "tm.h" #include "flags.h" #include "toplev.h" @@ -41,17 +42,11 @@ #include "tree.h" #include "diagnostic.h" -#include <stdlib.h> -#include <unistd.h> -#include <ctype.h> -#include <stdarg.h> -#include <string.h> -#include <stdio.h> - #include "treelang.h" #include "treetree.h" extern int yyparse (void); + /* Linked list of symbols - all must be unique in treelang. */ static GTY(()) struct prod_token_parm_item *symbol_table = NULL; diff --git a/gcc/treelang/treetree.c b/gcc/treelang/treetree.c index 248d487..f489fdf 100644 --- a/gcc/treelang/treetree.c +++ b/gcc/treelang/treetree.c @@ -54,25 +54,12 @@ /* Note it is OK to use GCC extensions such as long long in a compiler front end. This is because the GCC front ends are built using GCC. */ -/* Standard/OS headers. */ - -#include <stdlib.h> -#include <unistd.h> -#include "safe-ctype.h" -#include <errno.h> -#include <stdarg.h> -#include <limits.h> -#include <string.h> - -#include <fcntl.h> -#include <getopt.h> -#include <stdio.h> - /* GCC headers. */ #include "config.h" -#include "ansidecl.h" #include "system.h" +#include "coretypes.h" +#include "tm.h" #include "tree.h" #include "flags.h" #include "output.h" |