framework annotations for -v

Michael Meissner michael.meissner@amd.com
Fri Mar 30 21:02:00 GMT 2007


On Fri, Mar 30, 2007 at 10:24:03AM -0700, Mike Stump wrote:
> Ping?
> 
> On Mar 22, 2007, at 10:49 AM, Mike Stump wrote:
> 
> >Ping?
> >On Mar 12, 2007, at 6:41 PM, Mike Stump wrote:
> >>On Mar 6, 2007, at 2:24 PM, Mike Stump wrote:
> >>>Here is one to allow a target to annotate the -v output for  
> >>>include directories that have different include semantics defined  
> >>>by the target through the cpplib construct callback.
> >>
> >>Ping?
> >>
> >>http://gcc.gnu.org/ml/gcc-patches/2007-03/msg00390.html
> 

I looked at this, and it seems like it would be useful.  The one comment I have
is in the following part of the patch

--- ./c-incpath.c.~1~   2006-12-22 21:07:11.000000000 -0800
+++ ./c-incpath.c       2007-03-06 12:42:50.000000000 -0800
@@ -310,7 +310,11 @@ merge_include_chains (cpp_reader *pfile,
            fprintf (stderr, _("#include <...> search starts here:\n"));
          if (!p)
            break;
-         fprintf (stderr, " %s\n", p->name);
+         if (p->construct == 0)
+           fprintf (stderr, " %s\n", p->name);
+         else
+           fprintf (stderr, " %s%s\n", p->name,
+                    targetcm.include_construct_tag (p));
        }
       fprintf (stderr, _("End of search list.\n"));
     }
 

It may be safer programming to verify that targetcm.include_construct_tag does
not return a NULL pointer, and if it returns a NULL, just print the name.

-- 
Michael Meissner, AMD
90 Central Street, MS 83-29, Boxborough, MA, 01719, USA
michael.meissner@amd.com




More information about the Gcc-patches mailing list