Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Parsing C++ with GCC Plugins

CppNow via YouTube

Overview

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.

Syllabus

Introduction
Who has never heard of GCC
GCC Architecture
GCC Availability
GCC Plugin Requirements
Plugin Interface
GCC Computation Pipeline
Licensing
Abstract Syntax Tree
Three Nodes
Open Declaration
Other markers
Global namespace variable
Create simple traverser
Implement traverser
Diversity operations
Ticos variable
Sample code
What GC does
Types in GC
Multiple copies
Type nodes
Typedef
Example
owinwall
preprocess
OpenMP
CanRegister
Pragma
Primus Heavy
The Gentle Attributes
Runtime Template Instantiation
Custom Containers
Nessa Know
How would we handle this
Instantiating a template
Diagnostic
Comparison with SiLang
Competition

Taught by

CppNow

Reviews

Start your review of Parsing C++ with GCC Plugins

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.