This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: gengtype plugin improvement last4round -patch 4 [filerules]
On Tue, 23 Nov 2010 05:48:56 +0200
Laurynas Biveinis <laurynas.biveinis@gmail.com> wrote:
> In general, there is no need to surround DBGPRINTF with ENABLE_CHECKING.
[...]
> A patch to make these changes is pre-approved. Basile, can you take
> care of this?
I just committed the following patch:
Index: gcc/gengtype.c
===================================================================
--- gcc/gengtype.c (revision 167069)
+++ gcc/gengtype.c (working copy)
@@ -1868,16 +1868,12 @@ header_dot_h_frul (input_file* inpf, char**poutnam
{
const char *basename = 0;
int lang_index = 0;
-#if ENABLE_CHECKING
- const char *inpname = get_input_file_name (inpf);
DBGPRINTF ("inpf %p inpname %s outname %s forname %s",
- (void*) inpf, inpname, *poutname, *pforname);
-#endif
+ (void*) inpf, get_input_file_name (inpf),
+ *poutname, *pforname);
basename = get_file_basename (inpf);
lang_index = get_prefix_langdir_index (basename);
-#if ENABLE_CHECKING
DBGPRINTF ("basename %s lang_index %d", basename, lang_index);
-#endif
if (lang_index >= 0)
{
@@ -1896,7 +1892,8 @@ header_dot_h_frul (input_file* inpf, char**poutnam
get_output_file_with_visibility will find its outf_p. */
free (*poutname);
*poutname = xstrdup ("gtype-desc.c");
- DBGPRINTF ("special 'gtype-desc.c' for inpname %s", inpname);
+ DBGPRINTF ("special 'gtype-desc.c' for inpname %s",
+ get_input_file_name (inpf));
return NULL;
}
}
@@ -1912,13 +1909,11 @@ source_dot_c_frul (input_file* inpf, char**poutnam
{
char *newbasename = CONST_CAST (char*, get_file_basename (inpf));
char *newoutname = CONST_CAST (char*, get_file_gtfilename (inpf));
-#if ENABLE_CHECKING
- const char *inpname = get_input_file_name (inpf);
DBGPRINTF ("inpf %p inpname %s original outname %s forname %s",
- (void*) inpf, inpname, *poutname, *pforname);
+ (void*) inpf, get_input_file_name (inpf),
+ *poutname, *pforname);
DBGPRINTF ("newoutname %s", newoutname);
DBGPRINTF ("newbasename %s", newbasename);
-#endif
free (*poutname);
free (*pforname);
*poutname = newoutname;
#### gcc/ChangeLog entry #####
2010-11-23 Basile Starynkevitch <basile@starynkevitch.net>
* gengtype.c (header_dot_h_frul, source_dot_c_frul):
Remove ENABLE_CHECKING around DBGPRINTF.
###################
Committed revision 167070.
Thanks
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***