<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Parsing C++ with GCC plugins, Part 1</title>
	<link>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/</link>
	<description>Boris Kolpackov's blog about software</description>
	<pubDate>Wed, 08 Apr 2026 09:07:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.2</generator>

	<item>
		<title>By: Chad Colgur</title>
		<link>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1512</link>
		<author>Chad Colgur</author>
		<pubDate>Sun, 30 May 2010 17:56:26 +0000</pubDate>
		<guid>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1512</guid>
		<description>Thanks for the post. So right about the state of plug-in API documentation. Still, an incredibly useful addition to GCC.

If you're taking requests for this series of blog posts then static analysis would be of interest to me. My interest is program slicing, particularly amorphous slices (http://doi.ieeecomputersociety.org/10.1109/WPC.1997.601266).</description>
		<content:encoded><![CDATA[<p>Thanks for the post. So right about the state of plug-in API documentation. Still, an incredibly useful addition to GCC.</p>
<p>If you&#8217;re taking requests for this series of blog posts then static analysis would be of interest to me. My interest is program slicing, particularly amorphous slices (http://doi.ieeecomputersociety.org/10.1109/WPC.1997.601266).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philip Sajdak</title>
		<link>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1460</link>
		<author>Philip Sajdak</author>
		<pubDate>Mon, 10 May 2010 07:18:07 +0000</pubDate>
		<guid>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1460</guid>
		<description>Great post! It would be nice to read more about it.</description>
		<content:encoded><![CDATA[<p>Great post! It would be nice to read more about it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonas Bülow</title>
		<link>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1459</link>
		<author>Jonas Bülow</author>
		<pubDate>Mon, 10 May 2010 06:32:26 +0000</pubDate>
		<guid>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1459</guid>
		<description>Nice introduction! I look forward to more on this topic from you.</description>
		<content:encoded><![CDATA[<p>Nice introduction! I look forward to more on this topic from you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philip Craig</title>
		<link>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1456</link>
		<author>Philip Craig</author>
		<pubDate>Tue, 04 May 2010 09:53:16 +0000</pubDate>
		<guid>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1456</guid>
		<description>Hi please keep the series going, there is room for better documentation on analysing the AST with g++ plugins.</description>
		<content:encoded><![CDATA[<p>Hi please keep the series going, there is room for better documentation on analysing the AST with g++ plugins.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yoco</title>
		<link>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1455</link>
		<author>yoco</author>
		<pubDate>Tue, 04 May 2010 09:40:00 +0000</pubDate>
		<guid>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1455</guid>
		<description>I am very interested in it! I always hope to create a refactoring tool for C++. But the parsing work is really killing me T_T</description>
		<content:encoded><![CDATA[<p>I am very interested in it! I always hope to create a refactoring tool for C++. But the parsing work is really killing me T_T</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boris Kolpackov</title>
		<link>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1454</link>
		<author>Boris Kolpackov</author>
		<pubDate>Tue, 04 May 2010 08:23:54 +0000</pubDate>
		<guid>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1454</guid>
		<description>Dmitriy,

Yes, it is definitely possible to modify the tree. The GCC test suite contains a couple of basic examples of this:

http://gcc.gnu.org/viewcvs/trunk/gcc/testsuite/gcc.dg/plugin/

The finish_unit_plugin.c shows how to create a function and start_unit_plugin.c shows how to create a global variable. But for more serious modifications the GCC Internals documentation and the GCC source code are probably your best bet.

Boris</description>
		<content:encoded><![CDATA[<p>Dmitriy,</p>
<p>Yes, it is definitely possible to modify the tree. The GCC test suite contains a couple of basic examples of this:</p>
<p><a href="http://gcc.gnu.org/viewcvs/trunk/gcc/testsuite/gcc.dg/plugin/" rel="nofollow">http://gcc.gnu.org/viewcvs/trunk/gcc/testsuite/gcc.dg/plugin/</a></p>
<p>The finish_unit_plugin.c shows how to create a function and start_unit_plugin.c shows how to create a global variable. But for more serious modifications the GCC Internals documentation and the GCC source code are probably your best bet.</p>
<p>Boris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastien Binet</title>
		<link>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1453</link>
		<author>Sebastien Binet</author>
		<pubDate>Tue, 04 May 2010 07:27:45 +0000</pubDate>
		<guid>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1453</guid>
		<description>yes ! keep them coming.

the gcc plugins area sorely lacks a getting-started or a how-to from first principles document.

cheers,
sebastien.</description>
		<content:encoded><![CDATA[<p>yes ! keep them coming.</p>
<p>the gcc plugins area sorely lacks a getting-started or a how-to from first principles document.</p>
<p>cheers,<br />
sebastien.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yosh</title>
		<link>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1452</link>
		<author>Yosh</author>
		<pubDate>Tue, 04 May 2010 07:10:25 +0000</pubDate>
		<guid>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1452</guid>
		<description>Nice &#38; concise introduction - thanks.</description>
		<content:encoded><![CDATA[<p>Nice &amp; concise introduction - thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dmitriy V'jukov</title>
		<link>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1451</link>
		<author>Dmitriy V'jukov</author>
		<pubDate>Tue, 04 May 2010 07:06:51 +0000</pubDate>
		<guid>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1451</guid>
		<description>Ah, small world! It's accidentally happened so that it's me who submitted XERCESC-1919. Thanks for the fix too ;)</description>
		<content:encoded><![CDATA[<p>Ah, small world! It&#8217;s accidentally happened so that it&#8217;s me who submitted XERCESC-1919. Thanks for the fix too ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dmitriy V'jukov</title>
		<link>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1450</link>
		<author>Dmitriy V'jukov</author>
		<pubDate>Tue, 04 May 2010 07:02:07 +0000</pubDate>
		<guid>https://codesynthesis.com/~boris/blog//2010/05/03/parsing-cxx-with-gcc-plugin-part-1/#comment-1450</guid>
		<description>Hi,

Thank you for the info. I would like to read more about plugins.
Btw, is it possible to modify AST with plugins? What I would like to do is to add some arguments to some function calls. And it is possible to get the functionality of __FILE__, __LINE__, __FUNCTION__? Currently I have:

#define INFO debug_info_t(__FILE__, __LINE__, __FUNCTION__)
void foo(..., debug_info_t info);

foo(..., INFO);

I would like to eliminate those INFO parameters.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Thank you for the info. I would like to read more about plugins.<br />
Btw, is it possible to modify AST with plugins? What I would like to do is to add some arguments to some function calls. And it is possible to get the functionality of __FILE__, __LINE__, __FUNCTION__? Currently I have:</p>
<p>#define INFO debug_info_t(__FILE__, __LINE__, __FUNCTION__)<br />
void foo(&#8230;, debug_info_t info);</p>
<p>foo(&#8230;, INFO);</p>
<p>I would like to eliminate those INFO parameters.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
