This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gengtype plugin improvement last4round -patch 4 [filerules]


On Sun, Nov 21, 2010 at 11:39 PM, Basile Starynkevitch
<basile@starynkevitch.net> wrote:
> On Mon, 22 Nov 2010 08:53:54 +0200
> Laurynas Biveinis <laurynas.biveinis@gmail.com> wrote:
>> > Ok if it bootstraps?
>>
>> OK if it bootstraps and since this changes a potentially fragile area,
>> could you also check that before/after gengtype output is identical.
>
>
> It did bootstrap, and I
>
> Committed revision 167024.
>

This caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46609

I am testing the enclosed patch.  I will check it in if it passes bootstrap
with and without --enable-checking=assert

H.J.
---
Index: gengtype.c
===================================================================
--- gengtype.c	(revision 167038)
+++ gengtype.c	(working copy)
@@ -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, cha
 {
   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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]