This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[treelang] Whitespace cleanup.
- From: ja2morri at csclub dot uwaterloo dot ca (James A. Morrison)
- To: gcc-patches at gcc dot gnu dot org
- Date: 26 Jan 2005 20:59:34 -0500
- Subject: [treelang] Whitespace cleanup.
Hi,
This patch just changes the whitespace in some of the treelang files.
Ok for mainline when testing of the other patches, and this one, complete?
--
Thanks,
Jim
http://www.student.cs.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim
2005-01-26 James A. Morrison <phython@gcc.gnu.org>
* parse.y: Reformat comments.
* treetree.c: Likewise.
* treetree.h: Likewise.
Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/treelang/parse.y,v
retrieving revision 1.17
diff -u -p -r1.17 parse.y
--- parse.y 6 Oct 2004 04:47:42 -0000 1.17
+++ parse.y 27 Jan 2005 00:38:42 -0000
@@ -146,7 +146,7 @@ the GCC compiler. */
%%
file:
-/* Nil. */ {
+/* Nil. */ {
/* Nothing to do. */
}
|declarations {
@@ -369,7 +369,7 @@ variable_defs_opt statements_opt RIGHT_B
;
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 +734,12 @@ NAME {
;
init_opt:
-/* Nil. */ {
+/* Nil. */ {
$$ = 0;
}
|init {
- /* Nothing to do. */
+ /* Pass the initialization value up. */
+ $$ = $1;
};
init:
Index: treetree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/treelang/treetree.c,v
retrieving revision 1.50
diff -u -p -r1.50 treetree.c
--- treetree.c 25 Oct 2004 03:03:24 -0000 1.50
+++ treetree.c 27 Jan 2005 00:38:43 -0000
@@ -337,6 +338,7 @@ tree_code_create_function_prototype (uns
/* 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 +488,6 @@ tree_code_create_function_wrapup (locati
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 +504,12 @@ tree_code_create_function_wrapup (locati
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,
Index: treetree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/treelang/treetree.h,v
retrieving revision 1.9
diff -u -p -r1.9 treetree.h
--- treetree.h 8 Aug 2004 04:47:17 -0000 1.9
+++ treetree.h 27 Jan 2005 00:38:43 -0000
@@ -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 +64,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);
-
-