This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[mainline] PATCH to diagnostic.c and toplev.c
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: gcc-patches at gcc dot gnu dot org
- Date: 06 Sep 2003 23:35:18 +0200
- Subject: [mainline] PATCH to diagnostic.c and toplev.c
- Organization: Integrable Solutions
this moves the definition of announce_function from diagnostic.c to
toplev.c. This is part of the project of making diagnostic.[hc]
usable by other parts of GCC (like cpplib and gen*)
Bootstrapped and regtested on an i686-pc-linux-gnu.
-- Gaby
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
retrieving revision 2.987
diff -p -r2.987 ChangeLog
*** ChangeLog 6 Sep 2003 17:05:02 -0000 2.987
--- ChangeLog 6 Sep 2003 19:26:45 -0000
***************
*** 1,3 ****
--- 1,7 ----
+ 2003-09-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * diagnostic.c (announce_function): Move to toplev.c.
+
2003-09-06 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
* gcse.c (expr_equiv_p): Don't consider anything to be equal to
Index: diagnostic.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/diagnostic.c,v
retrieving revision 1.127
diff -p -r1.127 diagnostic.c
*** diagnostic.c 25 Jul 2003 09:52:24 -0000 1.127
--- diagnostic.c 6 Sep 2003 19:26:46 -0000
*************** diagnostic_action_after_output (diagnost
*** 279,301 ****
}
}
- /* Called when the start of a function definition is parsed,
- this function prints on stderr the name of the function. */
- void
- announce_function (tree decl)
- {
- if (!quiet_flag)
- {
- if (rtl_dump_and_exit)
- verbatim ("%s ", IDENTIFIER_POINTER (DECL_NAME (decl)));
- else
- verbatim (" %s", (*lang_hooks.decl_printable_name) (decl, 2));
- fflush (stderr);
- global_dc->printer->need_newline = true;
- diagnostic_set_last_function (global_dc);
- }
- }
-
/* The default function to print out name of current function that caused
an error. */
void
--- 279,284 ----
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.821
diff -p -r1.821 toplev.c
*** toplev.c 4 Sep 2003 08:45:42 -0000 1.821
--- toplev.c 6 Sep 2003 19:26:48 -0000
*************** get_src_pwd (void)
*** 1205,1210 ****
--- 1205,1227 ----
return src_pwd;
}
+ /* Called when the start of a function definition is parsed,
+ this function prints on stderr the name of the function. */
+ void
+ announce_function (tree decl)
+ {
+ if (!quiet_flag)
+ {
+ if (rtl_dump_and_exit)
+ verbatim ("%s ", IDENTIFIER_POINTER (DECL_NAME (decl)));
+ else
+ verbatim (" %s", (*lang_hooks.decl_printable_name) (decl, 2));
+ fflush (stderr);
+ pp_needs_newline (global_dc->printer) = true;
+ diagnostic_set_last_function (global_dc);
+ }
+ }
+
/* Set up a default flag_random_seed and local_tick, unless the user
already specified one. */