gccint: C and C++ Trees

1 
1 11.10 C and C++ Trees
1 =====================
1 
1 This section documents the internal representation used by GCC to
1 represent C and C++ source programs.  When presented with a C or C++
1 source program, GCC parses the program, performs semantic analysis
1 (including the generation of error messages), and then produces the
1 internal representation described here.  This representation contains a
1 complete representation for the entire translation unit provided as
1 input to the front end.  This representation is then typically processed
1 by a code-generator in order to produce machine code, but could also be
1 used in the creation of source browsers, intelligent editors, automatic
1 documentation generators, interpreters, and any other programs needing
1 the ability to process C or C++ code.
1 
1  This section explains the internal representation.  In particular, it
1 documents the internal representation for C and C++ source constructs,
1 and the macros, functions, and variables that can be used to access
1 these constructs.  The C++ representation is largely a superset of the
1 representation used in the C front end.  There is only one construct
1 used in C that does not appear in the C++ front end and that is the GNU
1 "nested function" extension.  Many of the macros documented here do not
1 apply in C because the corresponding language constructs do not appear
1 in C.
1 
1  The C and C++ front ends generate a mix of GENERIC trees and ones
1 specific to C and C++.  These language-specific trees are higher-level
1 constructs than the ones in GENERIC to make the parser's job easier.
1 This section describes those trees that aren't part of GENERIC as well
1 as aspects of GENERIC trees that are treated in a language-specific
1 manner.
1 
1  If you are developing a "back end", be it is a code-generator or some
1 other tool, that uses this representation, you may occasionally find
1 that you need to ask questions not easily answered by the functions and
1 macros available here.  If that situation occurs, it is quite likely
1 that GCC already supports the functionality you desire, but that the
1 interface is simply not documented here.  In that case, you should ask
1 the GCC maintainers (via mail to <gcc@gcc.gnu.org>) about documenting
1 the functionality you require.  Similarly, if you find yourself writing
1 functions that do not deal directly with your back end, but instead
1 might be useful to other people using the GCC front end, you should
1 submit your patches for inclusion in GCC.
1 

Menu