Skip to content

puzhaling/gnucpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GNU CPP Examples (GCC 16.0.0 pre-release)

A collection of C source files demonstrating the features, quirks, and pitfalls of the GNU C Preprocessor.
This repository is light on commentary and heavy on practical code.

The best way to use these examples is to explore the output of the preprocessor directly by running `cpp <filename>` or `gcc -E <filename>` to see the transformations in action.

The following features are demonstrated:
- Initial processing && Tokenization
- Preprocessing Language:
  * The #include directive
  * Computed includes
  * Object-like and function-like macros
  * Stringizing (#) and Token concatenation (##)
  * Variadic macros (__VA_AGRS__)
  * Interaction of #include with #undef and related quirks
  * Directives within function-like macro arguments
  * Misnesting behaviour
  * Arguments Prescan
  * Conditionals
  * Line Control (#line directive)
  * Pragmas (which is still esotheric for me)

About

GNU CPP Examples (GCC 16.0.0 pre-release)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages