Parsing C++ with GCC Plugins
Explore the intricacies of parsing C++ using GCC plugins in this comprehensive conference talk from CppNow. Dive into the GNU Compiler Collection's dynamic plugin architecture, introduced in GCC 4.5.0, and learn how to customize the compilation process. Gain insights into the internal representation of parsed translation units and implement a simple plugin to print information about C++ declarations. Discover advanced techniques such as injecting extra C++ code, programmatic template instantiation, and handling application-specific pragmas and attributes. Compare GCC's plugin architecture with Clang and participate in a brainstorming session on potential applications for GCC plugins in Boost and beyond. Master concepts like Abstract Syntax Trees, global namespace variables, traversers, and runtime template instantiation through practical examples and sample code demonstrations.