OSDN Git Service

Add check for ENABLE_CHECKING,
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 22 Nov 2010 19:56:25 +0000 (19:56 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 22 Nov 2010 19:56:25 +0000 (19:56 +0000)
2010-11-22  H.J. Lu  <hongjiu.lu@intel.com>

PR bootstrap/46609
* gengtype.c (header_dot_h_frul): Check ENABLE_CHECKING.
(source_dot_c_frul): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167049 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/gengtype.c

index 858406b..e16b8e7 100644 (file)
@@ -1,3 +1,9 @@
+2010-11-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR bootstrap/46609
+       * gengtype.c (header_dot_h_frul): Check ENABLE_CHECKING.
+       (source_dot_c_frul): Likewise.
+
 2010-11-22  Basile Starynkevitch  <basile@starynkevitch.net>
 
        * gimple-pretty-print.c (dump_bb_header): Add check for cfun.
index d246234..ab7791f 100644 (file)
@@ -1863,16 +1863,21 @@ struct file_rule_st files_rules[] = {
    "gtype-desc.c" for common headers and corresponding output
    files for language-specific header files.  */
 static outf_p
-header_dot_h_frul (input_file* inpf, char**poutname, char**pforname)
+header_dot_h_frul (input_file* inpf, char**poutname,
+                  char**pforname ATTRIBUTE_UNUSED)
 {
   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
   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)
     {
@@ -1907,11 +1912,13 @@ source_dot_c_frul (input_file* inpf, char**poutname, char**pforname)
 {
   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);
   DBGPRINTF ("newoutname %s", newoutname);
   DBGPRINTF ("newbasename %s", newbasename);
+#endif
   free (*poutname);
   free (*pforname);
   *poutname = newoutname;