From: James A. Morrison Date: Tue, 1 Feb 2005 15:16:58 +0000 (+0000) Subject: parse.y: Reformat comments. X-Git-Tag: releases/gcc-4.0.0~1133 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=22f51792e37b88d526f03ea866ed1856e5a93546;p=thirdparty%2Fgcc.git parse.y: Reformat comments. 2005-02-01 James A. Morrison * parse.y: Reformat comments. * treetree.c: Likewise. * treetree.h: Likewise. From-SVN: r94543 --- diff --git a/gcc/treelang/ChangeLog b/gcc/treelang/ChangeLog index 00980a15d3bf..33d633fd73c6 100644 --- a/gcc/treelang/ChangeLog +++ b/gcc/treelang/ChangeLog @@ -1,3 +1,9 @@ +2005-02-01 James A. Morrison + + * parse.y: Reformat comments. + * treetree.c: Likewise. + * treetree.h: Likewise. + 2004-10-24 James A. Morrison * treetree.c (tree_code_generate_return): Wrap param declaration in diff --git a/gcc/treelang/parse.y b/gcc/treelang/parse.y index b1330c70ccfb..665157e82a7c 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 b7a99a9087cc..b621fadf1832 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 ac75d8c87d71..41ce452b6abc 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); - -