diff options
author | phython <phython@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-01 15:16:58 +0000 |
---|---|---|
committer | phython <phython@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-01 15:16:58 +0000 |
commit | 55b9ab159082334b399a52e5dec746569b6c7fbc (patch) | |
tree | 72d1e0cc57227e4a114b3c6fdd5f245c7960213c /gcc/treelang | |
parent | 2dab9672997dd3bfe291c76a1e13be736e92cbf3 (diff) | |
download | gcc-55b9ab159082334b399a52e5dec746569b6c7fbc.tar.gz |
2005-02-01 James A. Morrison <phython@gcc.gnu.org>
* parse.y: Reformat comments.
* treetree.c: Likewise.
* treetree.h: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94543 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/treelang')
-rw-r--r-- | gcc/treelang/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/treelang/parse.y | 13 | ||||
-rw-r--r-- | gcc/treelang/treetree.c | 8 | ||||
-rw-r--r-- | gcc/treelang/treetree.h | 14 |
4 files changed, 20 insertions, 21 deletions
diff --git a/gcc/treelang/ChangeLog b/gcc/treelang/ChangeLog index 00980a15d3b..33d633fd73c 100644 --- a/gcc/treelang/ChangeLog +++ b/gcc/treelang/ChangeLog @@ -1,3 +1,9 @@ +2005-02-01 James A. Morrison <phython@gcc.gnu.org> + + * parse.y: Reformat comments. + * treetree.c: Likewise. + * treetree.h: Likewise. + 2004-10-24 James A. Morrison <phython@gcc.gnu.org> * treetree.c (tree_code_generate_return): Wrap param declaration in diff --git a/gcc/treelang/parse.y b/gcc/treelang/parse.y index b1330c70ccf..665157e82a7 100644 --- a/gcc/treelang/parse.y +++ b/gcc/treelang/parse.y @@ -146,7 +146,7 @@ the GCC compiler. */ %% file: -/* Nil. */ { +/* Nil. */ { /* Nothing to do. */ } |declarations { @@ -369,7 +369,7 @@ variable_defs_opt statements_opt RIGHT_BRACE { ; variable_defs_opt: -/* Nil. */ { +/* Nil. */ { $$ = 0; } |variable_defs { @@ -378,7 +378,7 @@ variable_defs_opt: ; statements_opt: -/* Nil. */ { +/* Nil. */ { $$ = 0; } |statements { @@ -550,7 +550,7 @@ tl_RETURN expression_opt { ; expression_opt: -/* Nil. */ { +/* Nil. */ { $$ = 0; } |expression { @@ -727,11 +727,12 @@ NAME { ; init_opt: -/* Nil. */ { +/* Nil. */ { $$ = 0; } |init { - /* Nothing to do. */ + /* Pass the initialization value up. */ + $$ = $1; }; init: diff --git a/gcc/treelang/treetree.c b/gcc/treelang/treetree.c index b7a99a9087c..b621fadf183 100644 --- a/gcc/treelang/treetree.c +++ b/gcc/treelang/treetree.c @@ -337,6 +337,7 @@ tree_code_create_function_prototype (unsigned char* chars, /* Last parm if void indicates fixed length list (as opposed to printf style va_* list). */ type_list = tree_cons (NULL_TREE, void_type_node, type_list); + /* The back end needs them in reverse order. */ type_list = nreverse (type_list); @@ -493,7 +494,6 @@ tree_code_create_function_wrapup (location_t loc) allocate_struct_function (fn_decl); cfun->function_end_locus = loc; - /* Dump the original tree to a file. */ dump_function (TDI_original, fn_decl); @@ -510,14 +510,12 @@ tree_code_create_function_wrapup (location_t loc) cgraph_finalize_function (fn_decl, false); } -/* - Create a variable. +/* Create a variable. The storage class is STORAGE_CLASS (eg LOCAL). The name is CHARS/LENGTH. The type is EXPRESSION_TYPE (eg UNSIGNED_TYPE). - The init tree is INIT. -*/ + The init tree is INIT. */ tree tree_code_create_variable (unsigned int storage_class, diff --git a/gcc/treelang/treetree.h b/gcc/treelang/treetree.h index ac75d8c87d7..41ce452b6ab 100644 --- a/gcc/treelang/treetree.h +++ b/gcc/treelang/treetree.h @@ -1,10 +1,8 @@ -/* - - TREELANG Compiler definitions for interfacing to treetree.c +/* TREELANG Compiler definitions for interfacing to treetree.c (compiler back end interface). - Copyright (C) 1986, 87, 89, 92-96, 1997, 1999, 2000, 2001, 2002, 2003, 2004 - Free Software Foundation, Inc. + Copyright (C) 1986, 87, 89, 92-96, 1997, 1999, 2000, 2001, 2002, 2003, + 2004, 2005 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 @@ -28,9 +26,7 @@ --------------------------------------------------------------------------- Written by Tim Josling 1999, 2000, 2001, based in part on other - parts of the GCC compiler. - - */ + parts of the GCC compiler. */ tree tree_code_init_parameters (void); tree tree_code_add_parameter (tree list, tree proto_exp, tree exp); @@ -69,5 +65,3 @@ void treelang_parse_file (int debug_flag); void push_var_level (void); void pop_var_level (void); const char* get_string (const char *s, size_t l); - - |