<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>gcc.Tree and its subclasses — gcc-python-plugin 0.9 documentation</title> <link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '', VERSION: '0.9', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <link rel="top" title="gcc-python-plugin 0.9 documentation" href="index.html" /> <link rel="next" title="Gimple statements" href="gimple.html" /> <link rel="prev" title="Working with functions and control flow graphs" href="cfg.html" /> </head> <body> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="gimple.html" title="Gimple statements" accesskey="N">next</a> |</li> <li class="right" > <a href="cfg.html" title="Working with functions and control flow graphs" accesskey="P">previous</a> |</li> <li><a href="index.html">gcc-python-plugin 0.9 documentation</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="gcc-tree-and-its-subclasses"> <h1>gcc.Tree and its subclasses<a class="headerlink" href="#gcc-tree-and-its-subclasses" title="Permalink to this headline">¶</a></h1> <p>The various language front-ends for GCC emit “tree” structures (which I believe are actually graphs), used throughout the rest of the internal representation of the code passing through GCC.</p> <dl class="class"> <dt id="gcc.Tree"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">Tree</tt><a class="headerlink" href="#gcc.Tree" title="Permalink to this definition">¶</a></dt> <dd><p>A <tt class="docutils literal"><span class="pre">gcc.Tree</span></tt> is a wrapper around GCC’s <cite>tree</cite> type</p> <dl class="method"> <dt id="gcc.Tree.debug"> <tt class="descname">debug</tt><big>(</big><big>)</big><a class="headerlink" href="#gcc.Tree.debug" title="Permalink to this definition">¶</a></dt> <dd><p>Dump the tree to stderr, using GCC’s own diagnostic routines</p> </dd></dl> <dl class="attribute"> <dt id="gcc.Tree.type"> <tt class="descname">type</tt><a class="headerlink" href="#gcc.Tree.type" title="Permalink to this definition">¶</a></dt> <dd><p>Instance of <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a> giving the type of the node</p> </dd></dl> <dl class="attribute"> <dt id="gcc.Tree.addr"> <tt class="descname">addr</tt><a class="headerlink" href="#gcc.Tree.addr" title="Permalink to this definition">¶</a></dt> <dd><p>(long) The address of the underlying GCC object in memory</p> </dd></dl> <p>The __str__ method is implemented using GCC’s own pretty-printer for trees, so e.g.:</p> <div class="highlight-python"><div class="highlight"><pre><span class="nb">str</span><span class="p">(</span><span class="n">t</span><span class="p">)</span> </pre></div> </div> <p>might return:</p> <div class="highlight-python"><div class="highlight"><pre><span class="s">'int <T531> (int, char * *)'</span> </pre></div> </div> <p>for a <cite>gcc.FunctionDecl</cite></p> <dl class="attribute"> <dt id="gcc.Tree.str_no_uid"> <tt class="descname">str_no_uid</tt><a class="headerlink" href="#gcc.Tree.str_no_uid" title="Permalink to this definition">¶</a></dt> <dd><p>A string representation of this object, like str(), but without including any internal UIDs.</p> <p>This is intended for use in selftests that compare output against some expected value, to avoid embedding values that change into the expected output.</p> <p>For example, given the type declaration above, where <cite>str(t)</cite> might return:</p> <div class="highlight-python"><div class="highlight"><pre><span class="s">'int <T531> (int, char * *)'</span> </pre></div> </div> <p>where the UID “531” is liable to change from compile to compile, whereas <cite>t.str_no_uid</cite> has value:</p> <div class="highlight-python"><div class="highlight"><pre><span class="s">'int <Txxx> (int, char * *)'</span> </pre></div> </div> <p>which won’t arbitrarily change each time.</p> </dd></dl> </dd></dl> <p>There are numerous subclasses of <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a>, some with numerous subclasses of their own. Some important parts of the class hierarchy include:</p> <table border="1" class="docutils"> <colgroup> <col width="47%" /> <col width="53%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Subclass</th> <th class="head">Meaning</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td><a class="reference internal" href="#gcc.Binary" title="gcc.Binary"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Binary</span></tt></a></td> <td>A binary arithmetic expression, with numerous subclasses</td> </tr> <tr class="row-odd"><td><a class="reference internal" href="#gcc.Block" title="gcc.Block"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Block</span></tt></a></td> <td>A symbol-binding block</td> </tr> <tr class="row-even"><td><a class="reference internal" href="#gcc.Comparison" title="gcc.Comparison"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Comparison</span></tt></a></td> <td>A relational operators (with various subclasses)</td> </tr> <tr class="row-odd"><td><a class="reference internal" href="#gcc.Constant" title="gcc.Constant"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Constant</span></tt></a></td> <td>Subclasses for constants</td> </tr> <tr class="row-even"><td><tt class="xref py py-class docutils literal"><span class="pre">gcc.Constructor</span></tt></td> <td>An aggregate value (e.g. in C, a structure or array initializer)</td> </tr> <tr class="row-odd"><td><a class="reference internal" href="#gcc.Declaration" title="gcc.Declaration"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Declaration</span></tt></a></td> <td>Subclasses relating to declarations (variables, functions, etc)</td> </tr> <tr class="row-even"><td><a class="reference internal" href="#gcc.Expression" title="gcc.Expression"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Expression</span></tt></a></td> <td>Subclasses relating to expressions</td> </tr> <tr class="row-odd"><td><tt class="xref py py-class docutils literal"><span class="pre">gcc.IdentifierNode</span></tt></td> <td>A name</td> </tr> <tr class="row-even"><td><a class="reference internal" href="#gcc.Reference" title="gcc.Reference"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Reference</span></tt></a></td> <td>Subclasses for relating to reference to storage (e.g. pointer values)</td> </tr> <tr class="row-odd"><td><tt class="xref py py-class docutils literal"><span class="pre">gcc.SsaName</span></tt></td> <td>A variable reference for SSA analysis</td> </tr> <tr class="row-even"><td><a class="reference internal" href="#gcc.Statement" title="gcc.Statement"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Statement</span></tt></a></td> <td>Subclasses for statement expressions, which have side-effects</td> </tr> <tr class="row-odd"><td><a class="reference internal" href="#gcc.Type" title="gcc.Type"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Type</span></tt></a></td> <td>Subclasses for describing the types of variables</td> </tr> <tr class="row-even"><td><a class="reference internal" href="#gcc.Unary" title="gcc.Unary"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Unary</span></tt></a></td> <td>Subclasses for unary arithmetic expressions</td> </tr> </tbody> </table> <div class="admonition note"> <p class="first admonition-title">Note</p> <p>Each subclass of <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a> is typically named after either one of the <cite>enum tree_code_class</cite> or <cite>enum tree_code</cite> values, with the names converted to Camel Case:</p> <p>For example a <a class="reference internal" href="#gcc.Binary" title="gcc.Binary"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Binary</span></tt></a> is a wrapper around a <cite>tree</cite> of type <cite>tcc_binary</cite>, and a <tt class="xref py py-class docutils literal"><span class="pre">gcc.PlusExpr</span></tt> is a wrapper around a <cite>tree</cite> of type <cite>PLUS_EXPR</cite>.</p> <p class="last">As of this writing, only a small subset of the various fields of the different subclasses have been wrapped yet, but it’s generally easy to add new ones. To add new fields, I’ve found it easiest to look at <cite>gcc/tree.h</cite> and <cite>gcc/print-tree.c</cite> within the GCC source tree and use the <cite>print_node</cite> function to figure out what the valid fields are. With that information, you should then look at <cite>generate-tree-c.py</cite>, which is the code that generates the Python wrapper classes (it’s used when building the plugin to create <cite>autogenerated-tree.c</cite>). Ideally when exposing a field to Python you should also add it to the API documentation, and add a test case.</p> </div> <dl class="function"> <dt id="gccutils.pformat"> <tt class="descclassname">gccutils.</tt><tt class="descname">pformat</tt><big>(</big><em>tree</em><big>)</big><a class="headerlink" href="#gccutils.pformat" title="Permalink to this definition">¶</a></dt> <dd><p>This function attempts to generate a debug dump of a <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a> and all of its “interesting” attributes, recursively. It’s loosely modelled on Python’s <cite>pprint</cite> module and GCC’s own <cite>debug_tree</cite> diagnostic routine using indentation to try to show the structure.</p> <p>It returns a string.</p> <p>It differs from <a class="reference internal" href="#gcc.Tree.debug" title="gcc.Tree.debug"><tt class="xref py py-meth docutils literal"><span class="pre">gcc.Tree.debug()</span></tt></a> in that it shows the Python wrapper objects, rather than the underlying GCC data structures themselves. For example, it can’t show attributes that haven’t been wrapped yet.</p> <p>Objects that have already been reported within this call are abbreviated to ”...” to try to keep the output readable.</p> <p>Example output:</p> <div class="highlight-python"><pre><FunctionDecl repr() = gcc.FunctionDecl('main') superclasses = (<type 'gcc.Declaration'>, <type 'gcc.Tree'>) .function = gcc.Function('main') .location = /home/david/coding/gcc-python/test.c:15 .name = 'main' .type = <FunctionType repr() = <gcc.FunctionType object at 0x2f62a60> str() = 'int <T531> (int, char * *)' superclasses = (<type 'gcc.Type'>, <type 'gcc.Tree'>) .name = None .type = <IntegerType repr() = <gcc.IntegerType object at 0x2f629d0> str() = 'int' superclasses = (<type 'gcc.Type'>, <type 'gcc.Tree'>) .const = False .name = <TypeDecl repr() = gcc.TypeDecl('int') superclasses = (<type 'gcc.Declaration'>, <type 'gcc.Tree'>) .location = None .name = 'int' .pointer = <PointerType repr() = <gcc.PointerType object at 0x2f62b80> str() = ' *' superclasses = (<type 'gcc.Type'>, <type 'gcc.Tree'>) .dereference = ... ("gcc.TypeDecl('int')") .name = None .type = ... ("gcc.TypeDecl('int')") > .type = ... ('<gcc.IntegerType object at 0x2f629d0>') > .precision = 32 .restrict = False .type = None .unsigned = False .volatile = False > > ></pre> </div> </dd></dl> <dl class="function"> <dt id="gccutils.pprint"> <tt class="descclassname">gccutils.</tt><tt class="descname">pprint</tt><big>(</big><em>tree</em><big>)</big><a class="headerlink" href="#gccutils.pprint" title="Permalink to this definition">¶</a></dt> <dd><p>Similar to <a class="reference internal" href="#gccutils.pformat" title="gccutils.pformat"><tt class="xref py py-meth docutils literal"><span class="pre">gccutils.pformat()</span></tt></a>, but prints the output to stdout.</p> <p>(should this be stderr instead? probably should take a stream as an arg, but what should the default be?)</p> </dd></dl> <div class="section" id="blocks"> <h2>Blocks<a class="headerlink" href="#blocks" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="gcc.Block"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">Block</tt><a class="headerlink" href="#gcc.Block" title="Permalink to this definition">¶</a></dt> <dd><p>A symbol binding block, such as the global symbols within a compilation unit.</p> <dl class="attribute"> <dt id="gcc.Block.vars"> <tt class="descname">vars</tt><a class="headerlink" href="#gcc.Block.vars" title="Permalink to this definition">¶</a></dt> <dd><p>The list of <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a> for the declarations and labels in this block</p> </dd></dl> </dd></dl> </div> <div class="section" id="declarations"> <h2>Declarations<a class="headerlink" href="#declarations" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="gcc.Declaration"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">Declaration</tt><a class="headerlink" href="#gcc.Declaration" title="Permalink to this definition">¶</a></dt> <dd><p>A subclass of <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a> indicating a declaration</p> <p>Corresponds to the <cite>tcc_declaration</cite> value of <cite>enum tree_code_class</cite> within GCC’s own C sources.</p> <dl class="attribute"> <dt id="gcc.Declaration.name"> <tt class="descname">name</tt><a class="headerlink" href="#gcc.Declaration.name" title="Permalink to this definition">¶</a></dt> <dd><p>(string) the name of this declaration</p> </dd></dl> <dl class="attribute"> <dt id="gcc.Declaration.location"> <tt class="descname">location</tt><a class="headerlink" href="#gcc.Declaration.location" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="basics.html#gcc.Location" title="gcc.Location"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Location</span></tt></a> for this declaration</p> </dd></dl> </dd></dl> <dl class="class"> <dt id="gcc.FieldDecl"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">FieldDecl</tt><a class="headerlink" href="#gcc.FieldDecl" title="Permalink to this definition">¶</a></dt> <dd><p>A subclass of <a class="reference internal" href="#gcc.Declaration" title="gcc.Declaration"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Declaration</span></tt></a> indicating the declaration of a field within a structure.</p> <dl class="attribute"> <dt id="gcc.FieldDecl.name"> <tt class="descname">name</tt><a class="headerlink" href="#gcc.FieldDecl.name" title="Permalink to this definition">¶</a></dt> <dd><p>(string) The name of this field</p> </dd></dl> </dd></dl> <dl class="class"> <dt id="gcc.FunctionDecl"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">FunctionDecl</tt><a class="headerlink" href="#gcc.FunctionDecl" title="Permalink to this definition">¶</a></dt> <dd><p>A subclass of <a class="reference internal" href="#gcc.Declaration" title="gcc.Declaration"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Declaration</span></tt></a> indicating the declaration of a function. Internally, this wraps a <cite>(struct tree_function_decl *)</cite></p> <dl class="attribute"> <dt id="gcc.FunctionDecl.function"> <tt class="descname">function</tt><a class="headerlink" href="#gcc.FunctionDecl.function" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="cfg.html#gcc.Function" title="gcc.Function"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Function</span></tt></a> for this declaration</p> </dd></dl> <dl class="attribute"> <dt id="gcc.FunctionDecl.arguments"> <tt class="descname">arguments</tt><a class="headerlink" href="#gcc.FunctionDecl.arguments" title="Permalink to this definition">¶</a></dt> <dd><p>List of <a class="reference internal" href="#gcc.ParmDecl" title="gcc.ParmDecl"><tt class="xref py py-class docutils literal"><span class="pre">gcc.ParmDecl</span></tt></a> representing the arguments of this function</p> </dd></dl> <dl class="attribute"> <dt id="gcc.FunctionDecl.result"> <tt class="descname">result</tt><a class="headerlink" href="#gcc.FunctionDecl.result" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="#gcc.ResultDecl" title="gcc.ResultDecl"><tt class="xref py py-class docutils literal"><span class="pre">gcc.ResultDecl</span></tt></a> representing the return value of this function</p> </dd></dl> <dl class="attribute"> <dt id="gcc.FunctionDecl.fullname"> <tt class="descname">fullname</tt><a class="headerlink" href="#gcc.FunctionDecl.fullname" title="Permalink to this definition">¶</a></dt> <dd><div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">This attribute is only usable with C++ code. Attempting to use it from another language will lead to a <cite>RuntimeError</cite> exception.</p> </div> <p>(string) The “full name” of this function, including the scope, return type and default arguments.</p> <p>For example, given this code:</p> <div class="highlight-c++"><div class="highlight"><pre><span class="k">namespace</span> <span class="n">Example</span> <span class="p">{</span> <span class="k">struct</span> <span class="n">Coord</span> <span class="p">{</span> <span class="kt">int</span> <span class="n">x</span><span class="p">;</span> <span class="kt">int</span> <span class="n">y</span><span class="p">;</span> <span class="p">};</span> <span class="k">class</span> <span class="nc">Widget</span> <span class="p">{</span> <span class="k">public</span><span class="o">:</span> <span class="kt">void</span> <span class="n">set_location</span><span class="p">(</span><span class="k">const</span> <span class="k">struct</span> <span class="n">Coord</span><span class="o">&</span> <span class="n">coord</span><span class="p">);</span> <span class="p">};</span> <span class="p">};</span> </pre></div> </div> <p><cite>set_location</cite>‘s fullname is:</p> <div class="highlight-python"><div class="highlight"><pre><span class="s">'void Example::Widget::set_location(const Example::Coord&)'</span> </pre></div> </div> </dd></dl> <dl class="attribute"> <dt id="gcc.FunctionDecl.callgraph_node"> <tt class="descname">callgraph_node</tt><a class="headerlink" href="#gcc.FunctionDecl.callgraph_node" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="callgraph.html#gcc.CallgraphNode" title="gcc.CallgraphNode"><tt class="xref py py-class docutils literal"><span class="pre">gcc.CallgraphNode</span></tt></a> for this function declaration, or <cite>None</cite></p> </dd></dl> <dl class="attribute"> <dt id="gcc.FunctionDecl.is_public"> <tt class="descname">is_public</tt><a class="headerlink" href="#gcc.FunctionDecl.is_public" title="Permalink to this definition">¶</a></dt> <dd><p>(bool) For C++: is this declaration “public”</p> </dd></dl> <dl class="attribute"> <dt id="gcc.FunctionDecl.is_private"> <tt class="descname">is_private</tt><a class="headerlink" href="#gcc.FunctionDecl.is_private" title="Permalink to this definition">¶</a></dt> <dd><p>(bool) For C++: is this declaration “private”</p> </dd></dl> <dl class="attribute"> <dt id="gcc.FunctionDecl.is_protected"> <tt class="descname">is_protected</tt><a class="headerlink" href="#gcc.FunctionDecl.is_protected" title="Permalink to this definition">¶</a></dt> <dd><p>(bool) For C++: is this declaration “protected”</p> </dd></dl> <dl class="attribute"> <dt id="gcc.FunctionDecl.is_static"> <tt class="descname">is_static</tt><a class="headerlink" href="#gcc.FunctionDecl.is_static" title="Permalink to this definition">¶</a></dt> <dd><p>(bool) For C++: is this declaration “static”</p> </dd></dl> </dd></dl> <dl class="class"> <dt id="gcc.ParmDecl"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ParmDecl</tt><a class="headerlink" href="#gcc.ParmDecl" title="Permalink to this definition">¶</a></dt> <dd><p>A subclass of <a class="reference internal" href="#gcc.Declaration" title="gcc.Declaration"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Declaration</span></tt></a> indicating the declaration of a parameter to a function or method.</p> </dd></dl> <dl class="class"> <dt id="gcc.ResultDecl"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ResultDecl</tt><a class="headerlink" href="#gcc.ResultDecl" title="Permalink to this definition">¶</a></dt> <dd><p>A subclass of <a class="reference internal" href="#gcc.Declaration" title="gcc.Declaration"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Declaration</span></tt></a> declararing a dummy variable that will hold the return value from a function.</p> </dd></dl> <dl class="class"> <dt id="gcc.VarDecl"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">VarDecl</tt><a class="headerlink" href="#gcc.VarDecl" title="Permalink to this definition">¶</a></dt> <dd><blockquote> <div><p>A subclass of <a class="reference internal" href="#gcc.Declaration" title="gcc.Declaration"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Declaration</span></tt></a> indicating the declaration of a variable (e.g. a global or a local).</p> <dl class="attribute"> <dt id="gcc.VarDecl.initial"> <tt class="descname">initial</tt><a class="headerlink" href="#gcc.VarDecl.initial" title="Permalink to this definition">¶</a></dt> <dd><p>The initial value for this variable as a <tt class="xref py py-class docutils literal"><span class="pre">gcc.Constructor</span></tt>, or None</p> </dd></dl> <dl class="attribute"> <dt id="gcc.VarDecl.static"> <tt class="descname">static</tt><a class="headerlink" href="#gcc.VarDecl.static" title="Permalink to this definition">¶</a></dt> <dd><p>(boolean) Is this variable to be allocated with static storage?</p> </dd></dl> </div></blockquote> </dd></dl> </div> <div class="section" id="types"> <h2>Types<a class="headerlink" href="#types" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="gcc.Type"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">Type</tt><a class="headerlink" href="#gcc.Type" title="Permalink to this definition">¶</a></dt> <dd><p>A subclass of <cite>gcc.Tree</cite> indicating a type</p> <p>Corresponds to the <cite>tcc_type</cite> value of <cite>enum tree_code_class</cite> within GCC’s own C sources.</p> <dl class="attribute"> <dt id="gcc.Type.name"> <tt class="descname">name</tt><a class="headerlink" href="#gcc.Type.name" title="Permalink to this definition">¶</a></dt> <dd><p>The <tt class="xref py py-class docutils literal"><span class="pre">gcc.IdentifierNode</span></tt> for the name of the type, or <cite>None</cite>.</p> </dd></dl> <dl class="attribute"> <dt id="gcc.Type.pointer"> <tt class="descname">pointer</tt><a class="headerlink" href="#gcc.Type.pointer" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="#gcc.PointerType" title="gcc.PointerType"><tt class="xref py py-class docutils literal"><span class="pre">gcc.PointerType</span></tt></a> representing the <cite>(this_type *)</cite> type</p> </dd></dl> <dl class="attribute"> <dt id="gcc.Type.attributes"> <tt class="descname">attributes</tt><a class="headerlink" href="#gcc.Type.attributes" title="Permalink to this definition">¶</a></dt> <dd><p>The user-defined attributes on this type (using GCC’s <cite>__attribute</cite> syntax), as a dictionary (mapping from attribute names to list of values). Typically this will be the empty dictionary.</p> </dd></dl> <dl class="attribute"> <dt id="gcc.Type.sizeof"> <tt class="descname">sizeof</tt><a class="headerlink" href="#gcc.Type.sizeof" title="Permalink to this definition">¶</a></dt> <dd><p><cite>sizeof()</cite> this type, as an <cite>int</cite>, or raising <cite>TypeError</cite> for those types which don’t have a well-defined size</p> </dd></dl> <p>The standard C types are accessible via class methods of <a class="reference internal" href="#gcc.Type" title="gcc.Type"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Type</span></tt></a>. They are only created by GCC after plugins are loaded, and so they’re only visible during callbacks, not during the initial run of the code. (yes, having them as class methods is slightly clumsy).</p> <p>Each of the following returns a <a class="reference internal" href="#gcc.Type" title="gcc.Type"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Type</span></tt></a> instance representing the given type (or None at startup before any passes, when the types don’t yet exist)</p> <blockquote> <div><table border="1" class="docutils"> <colgroup> <col width="58%" /> <col width="42%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Class method</th> <th class="head">C Type</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>gcc.Type.void()</td> <td><cite>void</cite></td> </tr> <tr class="row-odd"><td>gcc.Type.size_t()</td> <td><cite>size_t</cite></td> </tr> <tr class="row-even"><td>gcc.Type.char()</td> <td><cite>char</cite></td> </tr> <tr class="row-odd"><td>gcc.Type.signed_char()</td> <td><cite>signed char</cite></td> </tr> <tr class="row-even"><td>gcc.Type.unsigned_char()</td> <td><cite>unsigned char</cite></td> </tr> <tr class="row-odd"><td>gcc.Type.double()</td> <td><cite>double</cite></td> </tr> <tr class="row-even"><td>gcc.Type.float()</td> <td><cite>float</cite></td> </tr> <tr class="row-odd"><td>gcc.Type.short()</td> <td><cite>short</cite></td> </tr> <tr class="row-even"><td>gcc.Type.unsigned_short()</td> <td><cite>unsigned short</cite></td> </tr> <tr class="row-odd"><td>gcc.Type.int()</td> <td><cite>int</cite></td> </tr> <tr class="row-even"><td>gcc.Type.unsigned_int()</td> <td><cite>unsigned int</cite></td> </tr> <tr class="row-odd"><td>gcc.Type.long()</td> <td><cite>long</cite></td> </tr> <tr class="row-even"><td>gcc.Type.unsigned_long()</td> <td><cite>unsigned long</cite></td> </tr> <tr class="row-odd"><td>gcc.Type.long_double()</td> <td><cite>long double</cite></td> </tr> <tr class="row-even"><td>gcc.Type.long_long()</td> <td><cite>long long</cite></td> </tr> <tr class="row-odd"><td>gcc.Type.unsigned_long_long()</td> <td><cite>unsigned long long</cite></td> </tr> <tr class="row-even"><td>gcc.Type.int128()</td> <td><cite>int128</cite></td> </tr> <tr class="row-odd"><td>gcc.Type.unsigned_int128()</td> <td><cite>unsigned int128</cite></td> </tr> <tr class="row-even"><td>gcc.Type.uint32()</td> <td><cite>uint32</cite></td> </tr> <tr class="row-odd"><td>gcc.Type.uint64()</td> <td><cite>uint64</cite></td> </tr> </tbody> </table> </div></blockquote> </dd></dl> <dl class="class"> <dt id="gcc.IntegerType"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">IntegerType</tt><a class="headerlink" href="#gcc.IntegerType" title="Permalink to this definition">¶</a></dt> <dd><p>Subclass of <a class="reference internal" href="#gcc.Type" title="gcc.Type"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Type</span></tt></a>, adding a few properties:</p> <dl class="attribute"> <dt id="gcc.IntegerType.unsigned"> <tt class="descname">unsigned</tt><a class="headerlink" href="#gcc.IntegerType.unsigned" title="Permalink to this definition">¶</a></dt> <dd><p>(Boolean) True for ‘unsigned’, False for ‘signed’</p> </dd></dl> <dl class="attribute"> <dt id="gcc.IntegerType.precision"> <tt class="descname">precision</tt><a class="headerlink" href="#gcc.IntegerType.precision" title="Permalink to this definition">¶</a></dt> <dd><p>(int) The precision of this type in bits, as an int (e.g. 32)</p> </dd></dl> <dl class="attribute"> <dt id="gcc.IntegerType.signed_equivalent"> <tt class="descname">signed_equivalent</tt><a class="headerlink" href="#gcc.IntegerType.signed_equivalent" title="Permalink to this definition">¶</a></dt> <dd><p>The gcc.IntegerType for the signed version of this type</p> </dd></dl> <dl class="attribute"> <dt id="gcc.IntegerType.unsigned_equivalent"> <tt class="descname">unsigned_equivalent</tt><a class="headerlink" href="#gcc.IntegerType.unsigned_equivalent" title="Permalink to this definition">¶</a></dt> <dd><p>The gcc.IntegerType for the unsigned version of this type</p> </dd></dl> <dl class="attribute"> <dt id="gcc.IntegerType.max_value"> <tt class="descname">max_value</tt><a class="headerlink" href="#gcc.IntegerType.max_value" title="Permalink to this definition">¶</a></dt> <dd><p>The maximum possible value for this type, as a <tt class="xref py py-class docutils literal"><span class="pre">gcc.IntegerCst</span></tt></p> </dd></dl> <dl class="attribute"> <dt id="gcc.IntegerType.min_value"> <tt class="descname">min_value</tt><a class="headerlink" href="#gcc.IntegerType.min_value" title="Permalink to this definition">¶</a></dt> <dd><p>The minimum possible value for this type, as a <tt class="xref py py-class docutils literal"><span class="pre">gcc.IntegerCst</span></tt></p> </dd></dl> </dd></dl> <dl class="class"> <dt id="gcc.FloatType"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">FloatType</tt><a class="headerlink" href="#gcc.FloatType" title="Permalink to this definition">¶</a></dt> <dd><p>Subclass of <a class="reference internal" href="#gcc.Type" title="gcc.Type"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Type</span></tt></a> representing C’s <cite>float</cite> and <cite>double</cite> types</p> <dl class="attribute"> <dt id="gcc.FloatType.precision"> <tt class="descname">precision</tt><a class="headerlink" href="#gcc.FloatType.precision" title="Permalink to this definition">¶</a></dt> <dd><p>(int) The precision of this type in bits (32 for <cite>float</cite>; 64 for <cite>double</cite>)</p> </dd></dl> </dd></dl> <dl class="class"> <dt id="gcc.PointerType"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">PointerType</tt><a class="headerlink" href="#gcc.PointerType" title="Permalink to this definition">¶</a></dt> <dd><p>Subclass of <a class="reference internal" href="#gcc.Type" title="gcc.Type"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Type</span></tt></a> representing a pointer type, such as an <cite>int *</cite></p> <dl class="attribute"> <dt id="gcc.PointerType.dereference"> <tt class="descname">dereference</tt><a class="headerlink" href="#gcc.PointerType.dereference" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="#gcc.Type" title="gcc.Type"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Type</span></tt></a> that this type points to. In the above example (<cite>int *</cite>), this would be the <cite>int</cite> type.</p> </dd></dl> </dd></dl> <dl class="class"> <dt id="gcc.ArrayType"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ArrayType</tt><a class="headerlink" href="#gcc.ArrayType" title="Permalink to this definition">¶</a></dt> <dd><p>Subclass of <a class="reference internal" href="#gcc.Type" title="gcc.Type"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Type</span></tt></a> representing an array type. For example, in a C declaration such as:</p> <div class="highlight-python"><pre>char buf[16]</pre> </div> <p>we have a <a class="reference internal" href="#gcc.VarDecl" title="gcc.VarDecl"><tt class="xref py py-class docutils literal"><span class="pre">gcc.VarDecl</span></tt></a> for <cite>buf</cite>, and its type is an instance of <a class="reference internal" href="#gcc.ArrayType" title="gcc.ArrayType"><tt class="xref py py-class docutils literal"><span class="pre">gcc.ArrayType</span></tt></a>, representing <cite>char [16]</cite>.</p> <dl class="attribute"> <dt id="gcc.ArrayType.dereference"> <tt class="descname">dereference</tt><a class="headerlink" href="#gcc.ArrayType.dereference" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="#gcc.Type" title="gcc.Type"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Type</span></tt></a> that this type points to. In the above example, this would be the <cite>char</cite> type.</p> </dd></dl> <dl class="attribute"> <dt id="gcc.ArrayType.range"> <tt class="descname">range</tt><a class="headerlink" href="#gcc.ArrayType.range" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="#gcc.Type" title="gcc.Type"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Type</span></tt></a> that represents the range of the array’s indices. If the array has a known range, then this will ordinarily be an <a class="reference internal" href="#gcc.IntegerType" title="gcc.IntegerType"><tt class="xref py py-class docutils literal"><span class="pre">gcc.IntegerType</span></tt></a> whose <cite>min_value</cite> and <cite>max_value</cite> are the (inclusive) bounds of the array. If the array does not have a known range, then this attribute will be <cite>None</cite>.</p> <p>That is, in the example above, <cite>range.min_val</cite> is <cite>0</cite>, and <cite>range.max_val</cite> is <cite>15</cite>.</p> <p>But, for a C declaration like:</p> <div class="highlight-python"><pre>extern char array[];</pre> </div> <p>the type’s <cite>range</cite> would be <cite>None</cite>.</p> </dd></dl> </dd></dl> <dl class="class"> <dt id="gcc.VectorType"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">VectorType</tt><a class="headerlink" href="#gcc.VectorType" title="Permalink to this definition">¶</a></dt> <dd><dl class="attribute"> <dt id="gcc.VectorType.dereference"> <tt class="descname">dereference</tt><a class="headerlink" href="#gcc.VectorType.dereference" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="#gcc.Type" title="gcc.Type"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Type</span></tt></a> that this type points to</p> </dd></dl> </dd></dl> <p>Additional attributes for various <a class="reference internal" href="#gcc.Type" title="gcc.Type"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Type</span></tt></a> subclasses:</p> <blockquote> <div><dl class="attribute"> <dt id="const"> <tt class="descname">const</tt><a class="headerlink" href="#const" title="Permalink to this definition">¶</a></dt> <dd><p>(Boolean) Does this type have the <cite>const</cite> modifier?</p> </dd></dl> <dl class="attribute"> <dt id="const_equivalent"> <tt class="descname">const_equivalent</tt><a class="headerlink" href="#const_equivalent" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="#gcc.Type" title="gcc.Type"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Type</span></tt></a> for the <cite>const</cite> version of this type</p> </dd></dl> <dl class="attribute"> <dt id="volatile"> <tt class="descname">volatile</tt><a class="headerlink" href="#volatile" title="Permalink to this definition">¶</a></dt> <dd><p>(Boolean) Does this type have the <cite>volatile</cite> modifier?</p> </dd></dl> <dl class="attribute"> <dt id="volatile_equivalent"> <tt class="descname">volatile_equivalent</tt><a class="headerlink" href="#volatile_equivalent" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="#gcc.Type" title="gcc.Type"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Type</span></tt></a> for the <cite>volatile</cite> version of this type</p> </dd></dl> <dl class="attribute"> <dt id="restrict"> <tt class="descname">restrict</tt><a class="headerlink" href="#restrict" title="Permalink to this definition">¶</a></dt> <dd><p>(Boolean) Does this type have the <cite>restrict</cite> modifier?</p> </dd></dl> <dl class="attribute"> <dt id="restrict_equivalent"> <tt class="descname">restrict_equivalent</tt><a class="headerlink" href="#restrict_equivalent" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="#gcc.Type" title="gcc.Type"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Type</span></tt></a> for the <cite>restrict</cite> version of this type</p> </dd></dl> </div></blockquote> <dl class="class"> <dt id="gcc.FunctionType"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">FunctionType</tt><a class="headerlink" href="#gcc.FunctionType" title="Permalink to this definition">¶</a></dt> <dd><p>Subclass of <a class="reference internal" href="#gcc.Type" title="gcc.Type"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Type</span></tt></a> representing the type of a given function (or or a typedef to a function type, e.g. for callbacks).</p> <p>See also <a class="reference internal" href="#gcc.FunctionType" title="gcc.FunctionType"><tt class="xref py py-class docutils literal"><span class="pre">gcc.FunctionType</span></tt></a></p> <p>The <cite>type</cite> attribute holds the return type.</p> <dl class="attribute"> <dt id="gcc.FunctionType.argument_types"> <tt class="descname">argument_types</tt><a class="headerlink" href="#gcc.FunctionType.argument_types" title="Permalink to this definition">¶</a></dt> <dd><p>A tuple of <a class="reference internal" href="#gcc.Type" title="gcc.Type"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Type</span></tt></a> instances, representing the function’s argument types</p> </dd></dl> <dl class="function"> <dt id="gcc.FunctionType.gccutils.get_nonnull_arguments"> <tt class="descclassname">gccutils.</tt><tt class="descname">get_nonnull_arguments</tt><big>(</big><em>funtype</em><big>)</big><a class="headerlink" href="#gcc.FunctionType.gccutils.get_nonnull_arguments" title="Permalink to this definition">¶</a></dt> <dd><p>This is a utility function for working with the <cite>“nonnull”</cite> custom attribute on function types:</p> <p><a class="reference external" href="http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html">http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html</a></p> <p>Return a <cite>frozenset</cite> of 0-based integers, giving the arguments for which we can assume “nonnull-ness”, handling the various cases of:</p> <blockquote> <div><ul class="simple"> <li>the attribute isn’t present (returning the empty frozenset)</li> <li>the attribute is present, without args (all pointer args are non-NULL)</li> <li>the attribute is present, with a list of 1-based argument indices (Note that the result is still 0-based)</li> </ul> </div></blockquote> </dd></dl> </dd></dl> <dl class="class"> <dt id="gcc.MethodType"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">MethodType</tt><a class="headerlink" href="#gcc.MethodType" title="Permalink to this definition">¶</a></dt> <dd><p>Subclass of <a class="reference internal" href="#gcc.Type" title="gcc.Type"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Type</span></tt></a> representing the type of a given method. Similar to <a class="reference internal" href="#gcc.FunctionType" title="gcc.FunctionType"><tt class="xref py py-class docutils literal"><span class="pre">gcc.FunctionType</span></tt></a></p> <p>The <cite>type</cite> attribute holds the return type.</p> <dl class="attribute"> <dt id="gcc.MethodType.argument_types"> <tt class="descname">argument_types</tt><a class="headerlink" href="#gcc.MethodType.argument_types" title="Permalink to this definition">¶</a></dt> <dd><p>A tuple of <a class="reference internal" href="#gcc.Type" title="gcc.Type"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Type</span></tt></a> instances, representing the function’s argument types</p> </dd></dl> </dd></dl> <dl class="class"> <dt id="gcc.RecordType"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">RecordType</tt><a class="headerlink" href="#gcc.RecordType" title="Permalink to this definition">¶</a></dt> <dd><blockquote> <div><p>A compound type, such as a C <cite>struct</cite></p> <dl class="attribute"> <dt id="gcc.RecordType.fields"> <tt class="descname">fields</tt><a class="headerlink" href="#gcc.RecordType.fields" title="Permalink to this definition">¶</a></dt> <dd><p>The fields of this type, as a list of <a class="reference internal" href="#gcc.FieldDecl" title="gcc.FieldDecl"><tt class="xref py py-class docutils literal"><span class="pre">gcc.FieldDecl</span></tt></a> instances</p> </dd></dl> <p>You can look up C structures by looking within the top-level <a class="reference internal" href="#gcc.Block" title="gcc.Block"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Block</span></tt></a> within the current translation unit. For example, given this sample C code:</p> <blockquote> <div><div class="highlight-c"><div class="highlight"><pre><span class="cm">/* Example of a struct: */</span> <span class="k">struct</span> <span class="n">test_struct</span> <span class="p">{</span> <span class="kt">int</span> <span class="n">a</span><span class="p">;</span> <span class="kt">char</span> <span class="n">b</span><span class="p">;</span> <span class="kt">float</span> <span class="n">c</span><span class="p">;</span> <span class="p">};</span> <span class="kt">void</span> <span class="nf">foo</span><span class="p">()</span> <span class="p">{</span> <span class="p">}</span> </pre></div> </div> </div></blockquote> </div></blockquote> <p>then the following Python code:</p> <blockquote> <div><div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">gcc</span> <span class="k">class</span> <span class="nc">TestPass</span><span class="p">(</span><span class="n">gcc</span><span class="o">.</span><span class="n">GimplePass</span><span class="p">):</span> <span class="k">def</span> <span class="nf">execute</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">fn</span><span class="p">):</span> <span class="k">print</span><span class="p">(</span><span class="s">'fn: </span><span class="si">%r</span><span class="s">'</span> <span class="o">%</span> <span class="n">fn</span><span class="p">)</span> <span class="k">for</span> <span class="n">u</span> <span class="ow">in</span> <span class="n">gcc</span><span class="o">.</span><span class="n">get_translation_units</span><span class="p">():</span> <span class="k">for</span> <span class="n">decl</span> <span class="ow">in</span> <span class="n">u</span><span class="o">.</span><span class="n">block</span><span class="o">.</span><span class="n">vars</span><span class="p">:</span> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">decl</span><span class="p">,</span> <span class="n">gcc</span><span class="o">.</span><span class="n">TypeDecl</span><span class="p">):</span> <span class="c"># "decl" is a gcc.TypeDecl</span> <span class="c"># "decl.type" is a gcc.RecordType:</span> <span class="k">print</span><span class="p">(</span><span class="s">' type(decl): </span><span class="si">%s</span><span class="s">'</span> <span class="o">%</span> <span class="nb">type</span><span class="p">(</span><span class="n">decl</span><span class="p">))</span> <span class="k">print</span><span class="p">(</span><span class="s">' type(decl.type): </span><span class="si">%s</span><span class="s">'</span> <span class="o">%</span> <span class="nb">type</span><span class="p">(</span><span class="n">decl</span><span class="o">.</span><span class="n">type</span><span class="p">))</span> <span class="k">print</span><span class="p">(</span><span class="s">' decl.type.name: </span><span class="si">%r</span><span class="s">'</span> <span class="o">%</span> <span class="n">decl</span><span class="o">.</span><span class="n">type</span><span class="o">.</span><span class="n">name</span><span class="p">)</span> <span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">decl</span><span class="o">.</span><span class="n">type</span><span class="o">.</span><span class="n">fields</span><span class="p">:</span> <span class="k">print</span><span class="p">(</span><span class="s">' type(f): </span><span class="si">%s</span><span class="s">'</span> <span class="o">%</span> <span class="nb">type</span><span class="p">(</span><span class="n">f</span><span class="p">))</span> <span class="k">print</span><span class="p">(</span><span class="s">' f.name: </span><span class="si">%r</span><span class="s">'</span> <span class="o">%</span> <span class="n">f</span><span class="o">.</span><span class="n">name</span><span class="p">)</span> <span class="k">print</span><span class="p">(</span><span class="s">' f.type: </span><span class="si">%s</span><span class="s">'</span> <span class="o">%</span> <span class="n">f</span><span class="o">.</span><span class="n">type</span><span class="p">)</span> <span class="k">print</span><span class="p">(</span><span class="s">' type(f.type): </span><span class="si">%s</span><span class="s">'</span> <span class="o">%</span> <span class="nb">type</span><span class="p">(</span><span class="n">f</span><span class="o">.</span><span class="n">type</span><span class="p">))</span> <span class="n">test_pass</span> <span class="o">=</span> <span class="n">TestPass</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">'test-pass'</span><span class="p">)</span> </pre></div> </div> </div></blockquote> <p>will generate this output:</p> <blockquote> <div><div class="highlight-python"><pre>fn: gcc.Function('foo') type(decl): <type 'gcc.TypeDecl'> type(decl.type): <type 'gcc.RecordType'> decl.type.name: gcc.IdentifierNode(name='test_struct') type(f): <type 'gcc.FieldDecl'> f.name: 'a' f.type: int type(f.type): <type 'gcc.IntegerType'> type(f): <type 'gcc.FieldDecl'> f.name: 'b' f.type: char type(f.type): <type 'gcc.IntegerType'> type(f): <type 'gcc.FieldDecl'> f.name: 'c' f.type: float type(f.type): <type 'gcc.RealType'> </pre> </div> </div></blockquote> </dd></dl> </div> <div class="section" id="constants"> <h2>Constants<a class="headerlink" href="#constants" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="gcc.Constant"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">Constant</tt><a class="headerlink" href="#gcc.Constant" title="Permalink to this definition">¶</a></dt> <dd><p>Subclass of <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a> indicating a constant value.</p> <p>Corresponds to the <cite>tcc_constant</cite> value of <cite>enum tree_code_class</cite> within GCC’s own C sources.</p> <dl class="attribute"> <dt id="gcc.Constant.constant"> <tt class="descname">constant</tt><a class="headerlink" href="#gcc.Constant.constant" title="Permalink to this definition">¶</a></dt> <dd><p>The actual value of this constant, as the appropriate Python type:</p> <table border="1" class="docutils"> <colgroup> <col width="67%" /> <col width="33%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Subclass</th> <th class="head">Python type</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.Constant.ComplexCst"> <em class="property">class </em><tt class="descname">ComplexCst</tt><a class="headerlink" href="#gcc.Constant.ComplexCst" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="FixedCst"> <em class="property">class </em><tt class="descname">FixedCst</tt><a class="headerlink" href="#FixedCst" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="IntegerCst"> <em class="property">class </em><tt class="descname">IntegerCst</tt><a class="headerlink" href="#IntegerCst" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td><cite>int</cite> or <cite>long</cite></td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="PtrmemCst"> <em class="property">class </em><tt class="descname">PtrmemCst</tt><a class="headerlink" href="#PtrmemCst" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="RealCst"> <em class="property">class </em><tt class="descname">RealCst</tt><a class="headerlink" href="#RealCst" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td><cite>float</cite></td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="StringCst"> <em class="property">class </em><tt class="descname">StringCst</tt><a class="headerlink" href="#StringCst" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td><cite>str</cite></td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="VectorCst"> <em class="property">class </em><tt class="descname">VectorCst</tt><a class="headerlink" href="#VectorCst" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> </tbody> </table> </dd></dl> </dd></dl> </div> <div class="section" id="binary-expressions"> <h2>Binary Expressions<a class="headerlink" href="#binary-expressions" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="gcc.Binary"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">Binary</tt><a class="headerlink" href="#gcc.Binary" title="Permalink to this definition">¶</a></dt> <dd><blockquote> <div><p>Subclass of <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a> indicating a binary expression.</p> <p>Corresponds to the <cite>tcc_binary</cite> value of <cite>enum tree_code_class</cite> within GCC’s own C sources.</p> <dl class="attribute"> <dt id="gcc.Binary.location"> <tt class="descname">location</tt><a class="headerlink" href="#gcc.Binary.location" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="basics.html#gcc.Location" title="gcc.Location"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Location</span></tt></a> for this binary expression</p> </dd></dl> <dl class="classmethod"> <dt id="gcc.Binary.get_symbol"> <em class="property">classmethod </em><tt class="descname">get_symbol</tt><big>(</big><big>)</big><a class="headerlink" href="#gcc.Binary.get_symbol" title="Permalink to this definition">¶</a></dt> <dd><p>Get the symbol used in debug dumps for this <a class="reference internal" href="#gcc.Binary" title="gcc.Binary"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Binary</span></tt></a> subclass, if any, as a <cite>str</cite>. A table showing these strings can be seen <a class="reference internal" href="operators.html#get-symbols"><em>here</em></a>.</p> </dd></dl> <p>Has subclasses for the various kinds of binary expression. These include:</p> <p>Simple arithmetic:</p> <blockquote> <div><table border="1" class="docutils"> <colgroup> <col width="44%" /> <col width="34%" /> <col width="22%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Subclass</th> <th class="head">C/C++ operators</th> <th class="head">enum tree_code</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.Binary.gcc.PlusExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">PlusExpr</tt><a class="headerlink" href="#gcc.Binary.gcc.PlusExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td><cite>+</cite></td> <td>PLUS_EXPR</td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.MinusExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">MinusExpr</tt><a class="headerlink" href="#gcc.MinusExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td><cite>-</cite></td> <td>MINUS_EXPR</td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.MultExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">MultExpr</tt><a class="headerlink" href="#gcc.MultExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td><cite>*</cite></td> <td>MULT_EXPR</td> </tr> </tbody> </table> </div></blockquote> <p>Pointer addition:</p> <blockquote> <div><table border="1" class="docutils"> <colgroup> <col width="49%" /> <col width="25%" /> <col width="25%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Subclass</th> <th class="head">C/C++ operators</th> <th class="head">enum tree_code</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.PointerPlusExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">PointerPlusExpr</tt><a class="headerlink" href="#gcc.PointerPlusExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> <td>POINTER_PLUS_EXPR</td> </tr> </tbody> </table> </div></blockquote> <p>Various division operations:</p> <blockquote> <div><table border="1" class="docutils"> <colgroup> <col width="67%" /> <col width="33%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Subclass</th> <th class="head">C/C++ operators</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.TruncDivExr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">TruncDivExr</tt><a class="headerlink" href="#gcc.TruncDivExr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.CeilDivExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">CeilDivExpr</tt><a class="headerlink" href="#gcc.CeilDivExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.FloorDivExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">FloorDivExpr</tt><a class="headerlink" href="#gcc.FloorDivExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.RoundDivExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">RoundDivExpr</tt><a class="headerlink" href="#gcc.RoundDivExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> </tbody> </table> </div></blockquote> <p>The remainder counterparts of the above division operators:</p> <blockquote> <div><table border="1" class="docutils"> <colgroup> <col width="67%" /> <col width="33%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Subclass</th> <th class="head">C/C++ operators</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.TruncModExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">TruncModExpr</tt><a class="headerlink" href="#gcc.TruncModExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.CeilModExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">CeilModExpr</tt><a class="headerlink" href="#gcc.CeilModExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.FloorModExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">FloorModExpr</tt><a class="headerlink" href="#gcc.FloorModExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.RoundModExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">RoundModExpr</tt><a class="headerlink" href="#gcc.RoundModExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> </tbody> </table> </div></blockquote> <p>Division for reals:</p> <blockquote> <div><table border="1" class="docutils"> <colgroup> <col width="61%" /> <col width="39%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Subclass</th> <th class="head">C/C++ operators</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.RdivExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">RdivExpr</tt><a class="headerlink" href="#gcc.RdivExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> </tbody> </table> </div></blockquote> <p>Division that does not need rounding (e.g. for pointer subtraction in C):</p> <blockquote> <div><table border="1" class="docutils"> <colgroup> <col width="61%" /> <col width="39%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Subclass</th> <th class="head">C/C++ operators</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.ExactDivExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ExactDivExpr</tt><a class="headerlink" href="#gcc.ExactDivExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> </tbody> </table> </div></blockquote> <p>Max and min:</p> <blockquote> <div><blockquote> <div><table border="1" class="docutils"> <colgroup> <col width="61%" /> <col width="39%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Subclass</th> <th class="head">C/C++ operators</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.MaxExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">MaxExpr</tt><a class="headerlink" href="#gcc.MaxExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.MinExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">MinExpr</tt><a class="headerlink" href="#gcc.MinExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> </tbody> </table> </div></blockquote> <p>Shift and rotate operations:</p> <blockquote> <div><table border="1" class="docutils"> <colgroup> <col width="61%" /> <col width="39%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Subclass</th> <th class="head">C/C++ operators</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.LrotateExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">LrotateExpr</tt><a class="headerlink" href="#gcc.LrotateExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.LshiftExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">LshiftExpr</tt><a class="headerlink" href="#gcc.LshiftExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td><cite><<</cite>, <cite><<=</cite></td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.RrotateExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">RrotateExpr</tt><a class="headerlink" href="#gcc.RrotateExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.RshiftExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">RshiftExpr</tt><a class="headerlink" href="#gcc.RshiftExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td><cite>>></cite>, <cite>>>=</cite></td> </tr> </tbody> </table> </div></blockquote> </div></blockquote> <p>Bitwise binary expressions:</p> <blockquote> <div><table border="1" class="docutils"> <colgroup> <col width="58%" /> <col width="42%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Subclass</th> <th class="head">C/C++ operators</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.BitAndExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">BitAndExpr</tt><a class="headerlink" href="#gcc.BitAndExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td><cite>&</cite>, <cite>&=</cite> (bitwise “and”)</td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.BitIorExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">BitIorExpr</tt><a class="headerlink" href="#gcc.BitIorExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td><cite>|</cite>, <cite>|=</cite> (bitwise “or”)</td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.BitXorExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">BitXorExpr</tt><a class="headerlink" href="#gcc.BitXorExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td><cite>^</cite>, <cite>^=</cite> (bitwise “xor”)</td> </tr> </tbody> </table> </div></blockquote> </div></blockquote> <p>Other gcc.Binary subclasses:</p> <blockquote> <div><table border="1" class="docutils"> <colgroup> <col width="54%" /> <col width="46%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Subclass</th> <th class="head">Usage</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.CompareExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">CompareExpr</tt><a class="headerlink" href="#gcc.CompareExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.CompareGExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">CompareGExpr</tt><a class="headerlink" href="#gcc.CompareGExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.CompareLExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">CompareLExpr</tt><a class="headerlink" href="#gcc.CompareLExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.ComplexExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ComplexExpr</tt><a class="headerlink" href="#gcc.ComplexExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.MinusNomodExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">MinusNomodExpr</tt><a class="headerlink" href="#gcc.MinusNomodExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.PlusNomodExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">PlusNomodExpr</tt><a class="headerlink" href="#gcc.PlusNomodExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.RangeExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">RangeExpr</tt><a class="headerlink" href="#gcc.RangeExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.UrshiftExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">UrshiftExpr</tt><a class="headerlink" href="#gcc.UrshiftExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.VecExtractevenExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">VecExtractevenExpr</tt><a class="headerlink" href="#gcc.VecExtractevenExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.VecExtractoddExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">VecExtractoddExpr</tt><a class="headerlink" href="#gcc.VecExtractoddExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.VecInterleavehighExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">VecInterleavehighExpr</tt><a class="headerlink" href="#gcc.VecInterleavehighExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.VecInterleavelowExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">VecInterleavelowExpr</tt><a class="headerlink" href="#gcc.VecInterleavelowExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.VecLshiftExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">VecLshiftExpr</tt><a class="headerlink" href="#gcc.VecLshiftExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.VecPackFixTruncExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">VecPackFixTruncExpr</tt><a class="headerlink" href="#gcc.VecPackFixTruncExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.VecPackSatExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">VecPackSatExpr</tt><a class="headerlink" href="#gcc.VecPackSatExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.VecPackTruncExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">VecPackTruncExpr</tt><a class="headerlink" href="#gcc.VecPackTruncExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.VecRshiftExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">VecRshiftExpr</tt><a class="headerlink" href="#gcc.VecRshiftExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.WidenMultExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">WidenMultExpr</tt><a class="headerlink" href="#gcc.WidenMultExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.WidenMultHiExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">WidenMultHiExpr</tt><a class="headerlink" href="#gcc.WidenMultHiExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.WidenMultLoExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">WidenMultLoExpr</tt><a class="headerlink" href="#gcc.WidenMultLoExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.WidenSumExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">WidenSumExpr</tt><a class="headerlink" href="#gcc.WidenSumExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> </tbody> </table> </div></blockquote> </dd></dl> </div> <div class="section" id="unary-expressions"> <h2>Unary Expressions<a class="headerlink" href="#unary-expressions" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="gcc.Unary"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">Unary</tt><a class="headerlink" href="#gcc.Unary" title="Permalink to this definition">¶</a></dt> <dd><p>Subclass of <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a> indicating a unary expression (i.e. taking a single argument).</p> <p>Corresponds to the <cite>tcc_unary</cite> value of <cite>enum tree_code_class</cite> within GCC’s own C sources.</p> <dl class="attribute"> <dt id="gcc.Unary.operand"> <tt class="descname">operand</tt><a class="headerlink" href="#gcc.Unary.operand" title="Permalink to this definition">¶</a></dt> <dd><p>The operand of this operator, as a <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a>.</p> </dd></dl> <dl class="attribute"> <dt id="gcc.Unary.location"> <tt class="descname">location</tt><a class="headerlink" href="#gcc.Unary.location" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="basics.html#gcc.Location" title="gcc.Location"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Location</span></tt></a> for this unary expression</p> </dd></dl> <dl class="classmethod"> <dt id="gcc.Unary.get_symbol"> <em class="property">classmethod </em><tt class="descname">get_symbol</tt><big>(</big><big>)</big><a class="headerlink" href="#gcc.Unary.get_symbol" title="Permalink to this definition">¶</a></dt> <dd><p>Get the symbol used in debug dumps for this <a class="reference internal" href="#gcc.Unary" title="gcc.Unary"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Unary</span></tt></a> subclass, if any, as a <cite>str</cite>. A table showing these strings can be seen <a class="reference internal" href="operators.html#get-symbols"><em>here</em></a>.</p> </dd></dl> <p>Subclasses include:</p> <blockquote> <div><table border="1" class="docutils"> <colgroup> <col width="43%" /> <col width="57%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Subclass</th> <th class="head">Meaning; C/C++ operators</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.Unary.gcc.AbsExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">AbsExpr</tt><a class="headerlink" href="#gcc.Unary.gcc.AbsExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td>Absolute value</td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.AddrSpaceConvertExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">AddrSpaceConvertExpr</tt><a class="headerlink" href="#gcc.AddrSpaceConvertExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td>Conversion of pointers between address spaces</td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.BitNotExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">BitNotExpr</tt><a class="headerlink" href="#gcc.BitNotExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td><cite>~</cite> (bitwise “not”)</td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.CastExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">CastExpr</tt><a class="headerlink" href="#gcc.CastExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.ConjExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ConjExpr</tt><a class="headerlink" href="#gcc.ConjExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td>For complex types: complex conjugate</td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.ConstCastExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ConstCastExpr</tt><a class="headerlink" href="#gcc.ConstCastExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.ConvertExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ConvertExpr</tt><a class="headerlink" href="#gcc.ConvertExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.DynamicCastExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">DynamicCastExpr</tt><a class="headerlink" href="#gcc.DynamicCastExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.FixTruncExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">FixTruncExpr</tt><a class="headerlink" href="#gcc.FixTruncExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td>Convert real to fixed-point, via truncation</td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.FixedConvertExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">FixedConvertExpr</tt><a class="headerlink" href="#gcc.FixedConvertExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.FloatExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">FloatExpr</tt><a class="headerlink" href="#gcc.FloatExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td>Convert integer to real</td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.NegateExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">NegateExpr</tt><a class="headerlink" href="#gcc.NegateExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td>Unary negation</td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.NoexceptExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">NoexceptExpr</tt><a class="headerlink" href="#gcc.NoexceptExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.NonLvalueExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">NonLvalueExpr</tt><a class="headerlink" href="#gcc.NonLvalueExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.NopExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">NopExpr</tt><a class="headerlink" href="#gcc.NopExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.ParenExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ParenExpr</tt><a class="headerlink" href="#gcc.ParenExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.ReducMaxExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ReducMaxExpr</tt><a class="headerlink" href="#gcc.ReducMaxExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.ReducMinExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ReducMinExpr</tt><a class="headerlink" href="#gcc.ReducMinExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.ReducPlusExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ReducPlusExpr</tt><a class="headerlink" href="#gcc.ReducPlusExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.ReinterpretCastExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ReinterpretCastExpr</tt><a class="headerlink" href="#gcc.ReinterpretCastExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.StaticCastExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">StaticCastExpr</tt><a class="headerlink" href="#gcc.StaticCastExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.UnaryPlusExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">UnaryPlusExpr</tt><a class="headerlink" href="#gcc.UnaryPlusExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> </tbody> </table> </div></blockquote> </dd></dl> </div> <div class="section" id="comparisons"> <h2>Comparisons<a class="headerlink" href="#comparisons" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="gcc.Comparison"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">Comparison</tt><a class="headerlink" href="#gcc.Comparison" title="Permalink to this definition">¶</a></dt> <dd><p>Subclass of <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a> for comparison expressions</p> <p>Corresponds to the <cite>tcc_comparison</cite> value of <cite>enum tree_code_class</cite> within GCC’s own C sources.</p> <dl class="attribute"> <dt id="gcc.Comparison.location"> <tt class="descname">location</tt><a class="headerlink" href="#gcc.Comparison.location" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="basics.html#gcc.Location" title="gcc.Location"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Location</span></tt></a> for this comparison</p> </dd></dl> <dl class="classmethod"> <dt id="gcc.Comparison.get_symbol"> <em class="property">classmethod </em><tt class="descname">get_symbol</tt><big>(</big><big>)</big><a class="headerlink" href="#gcc.Comparison.get_symbol" title="Permalink to this definition">¶</a></dt> <dd><p>Get the symbol used in debug dumps for this <a class="reference internal" href="#gcc.Comparison" title="gcc.Comparison"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Comparison</span></tt></a> subclass, if any, as a <cite>str</cite>. A table showing these strings can be seen <a class="reference internal" href="operators.html#get-symbols"><em>here</em></a>.</p> </dd></dl> <p>Subclasses include:</p> <blockquote> <div><table border="1" class="docutils"> <colgroup> <col width="63%" /> <col width="37%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Subclass</th> <th class="head">C/C++ operators</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.Comparison.EqExpr"> <em class="property">class </em><tt class="descname">EqExpr</tt><a class="headerlink" href="#gcc.Comparison.EqExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td><cite>==</cite></td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="GeExpr"> <em class="property">class </em><tt class="descname">GeExpr</tt><a class="headerlink" href="#GeExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td><cite>>=</cite></td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="GtExpr"> <em class="property">class </em><tt class="descname">GtExpr</tt><a class="headerlink" href="#GtExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td><cite>></cite></td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="LeExpr"> <em class="property">class </em><tt class="descname">LeExpr</tt><a class="headerlink" href="#LeExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td><cite><=</cite></td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="LtExpr"> <em class="property">class </em><tt class="descname">LtExpr</tt><a class="headerlink" href="#LtExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td><cite><</cite></td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="LtgtExpr"> <em class="property">class </em><tt class="descname">LtgtExpr</tt><a class="headerlink" href="#LtgtExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="NeExpr"> <em class="property">class </em><tt class="descname">NeExpr</tt><a class="headerlink" href="#NeExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td><cite>!=</cite></td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="OrderedExpr"> <em class="property">class </em><tt class="descname">OrderedExpr</tt><a class="headerlink" href="#OrderedExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="UneqExpr"> <em class="property">class </em><tt class="descname">UneqExpr</tt><a class="headerlink" href="#UneqExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="UngeExpr"> <em class="property">class </em><tt class="descname">UngeExpr</tt><a class="headerlink" href="#UngeExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="UngtExpr"> <em class="property">class </em><tt class="descname">UngtExpr</tt><a class="headerlink" href="#UngtExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="UnleExpr"> <em class="property">class </em><tt class="descname">UnleExpr</tt><a class="headerlink" href="#UnleExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="UnltExpr"> <em class="property">class </em><tt class="descname">UnltExpr</tt><a class="headerlink" href="#UnltExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="UnorderedExpr"> <em class="property">class </em><tt class="descname">UnorderedExpr</tt><a class="headerlink" href="#UnorderedExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> </tbody> </table> </div></blockquote> </dd></dl> </div> <div class="section" id="references-to-storage"> <h2>References to storage<a class="headerlink" href="#references-to-storage" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="gcc.Reference"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">Reference</tt><a class="headerlink" href="#gcc.Reference" title="Permalink to this definition">¶</a></dt> <dd><p>Subclass of <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a> for expressions involving a reference to storage.</p> <p>Corresponds to the <cite>tcc_reference</cite> value of <cite>enum tree_code_class</cite> within GCC’s own C sources.</p> <dl class="attribute"> <dt id="gcc.Reference.location"> <tt class="descname">location</tt><a class="headerlink" href="#gcc.Reference.location" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="basics.html#gcc.Location" title="gcc.Location"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Location</span></tt></a> for this storage reference</p> </dd></dl> <dl class="classmethod"> <dt id="gcc.Reference.get_symbol"> <em class="property">classmethod </em><tt class="descname">get_symbol</tt><big>(</big><big>)</big><a class="headerlink" href="#gcc.Reference.get_symbol" title="Permalink to this definition">¶</a></dt> <dd><p>Get the symbol used in debug dumps for this <a class="reference internal" href="#gcc.Reference" title="gcc.Reference"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Reference</span></tt></a> subclass, if any, as a <cite>str</cite>. A table showing these strings can be seen <a class="reference internal" href="operators.html#get-symbols"><em>here</em></a>.</p> </dd></dl> </dd></dl> <dl class="class"> <dt id="gcc.ArrayRef"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ArrayRef</tt><a class="headerlink" href="#gcc.ArrayRef" title="Permalink to this definition">¶</a></dt> <dd><p>A subclass of <a class="reference internal" href="#gcc.Reference" title="gcc.Reference"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Reference</span></tt></a> for expressions involving an array reference:</p> <div class="highlight-c"><div class="highlight"><pre><span class="kt">unsigned</span> <span class="kt">char</span> <span class="n">buffer</span><span class="p">[</span><span class="mi">4096</span><span class="p">];</span> <span class="p">...</span> <span class="cm">/* The left-hand side of this gcc.GimpleAssign is a gcc.ArrayRef: */</span> <span class="n">buffer</span><span class="p">[</span><span class="mi">42</span><span class="p">]</span> <span class="o">=</span> <span class="mh">0xff</span><span class="p">;</span> </pre></div> </div> <dl class="attribute"> <dt id="gcc.ArrayRef.array"> <tt class="descname">array</tt><a class="headerlink" href="#gcc.ArrayRef.array" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a> for the array within the reference (<cite>gcc.VarDecl(‘buffer’)</cite> in the example above)</p> </dd></dl> <dl class="attribute"> <dt id="gcc.ArrayRef.index"> <tt class="descname">index</tt><a class="headerlink" href="#gcc.ArrayRef.index" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a> for the index within the reference (<cite>gcc.IntegerCst(42)</cite> in the example above)</p> </dd></dl> </dd></dl> <dl class="class"> <dt id="gcc.ComponentRef"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ComponentRef</tt><a class="headerlink" href="#gcc.ComponentRef" title="Permalink to this definition">¶</a></dt> <dd><p>A subclass of <a class="reference internal" href="#gcc.Reference" title="gcc.Reference"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Reference</span></tt></a> for expressions involving a field lookup.</p> <p>This can mean either a direct field lookup, as in:</p> <div class="highlight-c"><div class="highlight"><pre><span class="k">struct</span> <span class="n">mystruct</span> <span class="n">s</span><span class="p">;</span> <span class="p">...</span> <span class="n">s</span><span class="p">.</span><span class="n">idx</span> <span class="o">=</span> <span class="mi">42</span><span class="p">;</span> </pre></div> </div> <p>or dereferenced field lookup:</p> <div class="highlight-c"><div class="highlight"><pre><span class="k">struct</span> <span class="n">mystruct</span> <span class="o">*</span><span class="n">p</span><span class="p">;</span> <span class="p">...</span> <span class="n">p</span><span class="o">-></span><span class="n">idx</span> <span class="o">=</span> <span class="mi">42</span><span class="p">;</span> </pre></div> </div> <dl class="attribute"> <dt id="gcc.ComponentRef.target"> <tt class="descname">target</tt><a class="headerlink" href="#gcc.ComponentRef.target" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a> for the container of the field (either <cite>s</cite> or <cite>*p</cite> in the examples above)</p> </dd></dl> <dl class="attribute"> <dt id="gcc.ComponentRef.field"> <tt class="descname">field</tt><a class="headerlink" href="#gcc.ComponentRef.field" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="#gcc.FieldDecl" title="gcc.FieldDecl"><tt class="xref py py-class docutils literal"><span class="pre">gcc.FieldDecl</span></tt></a> for the field within the target.</p> </dd></dl> </dd></dl> <dl class="class"> <dt id="gcc.MemRef"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">MemRef</tt><a class="headerlink" href="#gcc.MemRef" title="Permalink to this definition">¶</a></dt> <dd><p>A subclass of <a class="reference internal" href="#gcc.Reference" title="gcc.Reference"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Reference</span></tt></a> for expressions involving dereferencing a pointer:</p> <div class="highlight-c"><div class="highlight"><pre><span class="kt">int</span> <span class="n">p</span><span class="p">,</span> <span class="o">*</span><span class="n">q</span><span class="p">;</span> <span class="p">...</span> <span class="n">p</span> <span class="o">=</span> <span class="o">*</span><span class="n">q</span><span class="p">;</span> </pre></div> </div> <dl class="attribute"> <dt id="gcc.MemRef.operand"> <tt class="descname">operand</tt><a class="headerlink" href="#gcc.MemRef.operand" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a> for the expression describing the target of the pointer</p> </dd></dl> </dd></dl> <p>Other subclasses of <a class="reference internal" href="#gcc.Reference" title="gcc.Reference"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Reference</span></tt></a> include:</p> <blockquote> <div><table border="1" class="docutils"> <colgroup> <col width="63%" /> <col width="37%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Subclass</th> <th class="head">C/C++ operators</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td><dl class="first last class"> <dt id="ArrayRangeRef"> <em class="property">class </em><tt class="descname">ArrayRangeRef</tt><a class="headerlink" href="#ArrayRangeRef" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="AttrAddrExpr"> <em class="property">class </em><tt class="descname">AttrAddrExpr</tt><a class="headerlink" href="#AttrAddrExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="BitFieldRef"> <em class="property">class </em><tt class="descname">BitFieldRef</tt><a class="headerlink" href="#BitFieldRef" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="ImagpartExpr"> <em class="property">class </em><tt class="descname">ImagpartExpr</tt><a class="headerlink" href="#ImagpartExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="IndirectRef"> <em class="property">class </em><tt class="descname">IndirectRef</tt><a class="headerlink" href="#IndirectRef" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="MemberRef"> <em class="property">class </em><tt class="descname">MemberRef</tt><a class="headerlink" href="#MemberRef" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="OffsetRef"> <em class="property">class </em><tt class="descname">OffsetRef</tt><a class="headerlink" href="#OffsetRef" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="RealpartExpr"> <em class="property">class </em><tt class="descname">RealpartExpr</tt><a class="headerlink" href="#RealpartExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="ScopeRef"> <em class="property">class </em><tt class="descname">ScopeRef</tt><a class="headerlink" href="#ScopeRef" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="TargetMemRef"> <em class="property">class </em><tt class="descname">TargetMemRef</tt><a class="headerlink" href="#TargetMemRef" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="UnconstrainedArrayRef"> <em class="property">class </em><tt class="descname">UnconstrainedArrayRef</tt><a class="headerlink" href="#UnconstrainedArrayRef" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="ViewConvertExpr"> <em class="property">class </em><tt class="descname">ViewConvertExpr</tt><a class="headerlink" href="#ViewConvertExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> </tbody> </table> </div></blockquote> </div> <div class="section" id="other-expression-subclasses"> <h2>Other expression subclasses<a class="headerlink" href="#other-expression-subclasses" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="gcc.Expression"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">Expression</tt><a class="headerlink" href="#gcc.Expression" title="Permalink to this definition">¶</a></dt> <dd><p>Subclass of <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a> indicating an expression that doesn’t fit into the other categories.</p> <p>Corresponds to the <cite>tcc_expression</cite> value of <cite>enum tree_code_class</cite> within GCC’s own C sources.</p> <dl class="attribute"> <dt id="gcc.Expression.location"> <tt class="descname">location</tt><a class="headerlink" href="#gcc.Expression.location" title="Permalink to this definition">¶</a></dt> <dd><p>The <a class="reference internal" href="basics.html#gcc.Location" title="gcc.Location"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Location</span></tt></a> for this expression</p> </dd></dl> <dl class="classmethod"> <dt id="gcc.Expression.get_symbol"> <em class="property">classmethod </em><tt class="descname">get_symbol</tt><big>(</big><big>)</big><a class="headerlink" href="#gcc.Expression.get_symbol" title="Permalink to this definition">¶</a></dt> <dd><p>Get the symbol used in debug dumps for this <a class="reference internal" href="#gcc.Expression" title="gcc.Expression"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Expression</span></tt></a> subclass, if any, as a <cite>str</cite>. A table showing these strings can be seen <a class="reference internal" href="operators.html#get-symbols"><em>here</em></a>.</p> </dd></dl> <p>Subclasses include:</p> <blockquote> <div><table border="1" class="docutils"> <colgroup> <col width="63%" /> <col width="37%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Subclass</th> <th class="head">C/C++ operators</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.Expression.gcc.AddrExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">AddrExpr</tt><a class="headerlink" href="#gcc.Expression.gcc.AddrExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.AlignofExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">AlignofExpr</tt><a class="headerlink" href="#gcc.AlignofExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.ArrowExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ArrowExpr</tt><a class="headerlink" href="#gcc.ArrowExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.AssertExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">AssertExpr</tt><a class="headerlink" href="#gcc.AssertExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.AtEncodeExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">AtEncodeExpr</tt><a class="headerlink" href="#gcc.AtEncodeExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.BindExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">BindExpr</tt><a class="headerlink" href="#gcc.BindExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.CMaybeConstExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">CMaybeConstExpr</tt><a class="headerlink" href="#gcc.CMaybeConstExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.ClassReferenceExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ClassReferenceExpr</tt><a class="headerlink" href="#gcc.ClassReferenceExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.CleanupPointExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">CleanupPointExpr</tt><a class="headerlink" href="#gcc.CleanupPointExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.CompoundExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">CompoundExpr</tt><a class="headerlink" href="#gcc.CompoundExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.CompoundLiteralExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">CompoundLiteralExpr</tt><a class="headerlink" href="#gcc.CompoundLiteralExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.CondExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">CondExpr</tt><a class="headerlink" href="#gcc.CondExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.CtorInitializer"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">CtorInitializer</tt><a class="headerlink" href="#gcc.CtorInitializer" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.DlExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">DlExpr</tt><a class="headerlink" href="#gcc.DlExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.DotProdExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">DotProdExpr</tt><a class="headerlink" href="#gcc.DotProdExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.DotstarExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">DotstarExpr</tt><a class="headerlink" href="#gcc.DotstarExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.EmptyClassExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">EmptyClassExpr</tt><a class="headerlink" href="#gcc.EmptyClassExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.ExcessPrecisionExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ExcessPrecisionExpr</tt><a class="headerlink" href="#gcc.ExcessPrecisionExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.ExprPackExpansion"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ExprPackExpansion</tt><a class="headerlink" href="#gcc.ExprPackExpansion" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.ExprStmt"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ExprStmt</tt><a class="headerlink" href="#gcc.ExprStmt" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.FdescExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">FdescExpr</tt><a class="headerlink" href="#gcc.FdescExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.FmaExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">FmaExpr</tt><a class="headerlink" href="#gcc.FmaExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.InitExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">InitExpr</tt><a class="headerlink" href="#gcc.InitExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.MessageSendExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">MessageSendExpr</tt><a class="headerlink" href="#gcc.MessageSendExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.ModifyExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ModifyExpr</tt><a class="headerlink" href="#gcc.ModifyExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.ModopExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ModopExpr</tt><a class="headerlink" href="#gcc.ModopExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.MustNotThrowExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">MustNotThrowExpr</tt><a class="headerlink" href="#gcc.MustNotThrowExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.NonDependentExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">NonDependentExpr</tt><a class="headerlink" href="#gcc.NonDependentExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.NontypeArgumentPack"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">NontypeArgumentPack</tt><a class="headerlink" href="#gcc.NontypeArgumentPack" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.NullExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">NullExpr</tt><a class="headerlink" href="#gcc.NullExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.NwExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">NwExpr</tt><a class="headerlink" href="#gcc.NwExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.ObjTypeRef"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ObjTypeRef</tt><a class="headerlink" href="#gcc.ObjTypeRef" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.OffsetofExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">OffsetofExpr</tt><a class="headerlink" href="#gcc.OffsetofExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.PolynomialChrec"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">PolynomialChrec</tt><a class="headerlink" href="#gcc.PolynomialChrec" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.PostdecrementExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">PostdecrementExpr</tt><a class="headerlink" href="#gcc.PostdecrementExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.PostincrementExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">PostincrementExpr</tt><a class="headerlink" href="#gcc.PostincrementExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.PredecrementExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">PredecrementExpr</tt><a class="headerlink" href="#gcc.PredecrementExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.PredictExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">PredictExpr</tt><a class="headerlink" href="#gcc.PredictExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.PreincrementExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">PreincrementExpr</tt><a class="headerlink" href="#gcc.PreincrementExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.PropertyRef"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">PropertyRef</tt><a class="headerlink" href="#gcc.PropertyRef" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.PseudoDtorExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">PseudoDtorExpr</tt><a class="headerlink" href="#gcc.PseudoDtorExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.RealignLoad"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">RealignLoad</tt><a class="headerlink" href="#gcc.RealignLoad" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.SaveExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">SaveExpr</tt><a class="headerlink" href="#gcc.SaveExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.ScevKnown"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ScevKnown</tt><a class="headerlink" href="#gcc.ScevKnown" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.ScevNotKnown"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ScevNotKnown</tt><a class="headerlink" href="#gcc.ScevNotKnown" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.SizeofExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">SizeofExpr</tt><a class="headerlink" href="#gcc.SizeofExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.StmtExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">StmtExpr</tt><a class="headerlink" href="#gcc.StmtExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.TagDefn"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">TagDefn</tt><a class="headerlink" href="#gcc.TagDefn" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.TargetExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">TargetExpr</tt><a class="headerlink" href="#gcc.TargetExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.TemplateIdExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">TemplateIdExpr</tt><a class="headerlink" href="#gcc.TemplateIdExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.ThrowExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">ThrowExpr</tt><a class="headerlink" href="#gcc.ThrowExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.TruthAndExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">TruthAndExpr</tt><a class="headerlink" href="#gcc.TruthAndExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.TruthAndifExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">TruthAndifExpr</tt><a class="headerlink" href="#gcc.TruthAndifExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.TruthNotExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">TruthNotExpr</tt><a class="headerlink" href="#gcc.TruthNotExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.TruthOrExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">TruthOrExpr</tt><a class="headerlink" href="#gcc.TruthOrExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.TruthOrifExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">TruthOrifExpr</tt><a class="headerlink" href="#gcc.TruthOrifExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.TruthXorExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">TruthXorExpr</tt><a class="headerlink" href="#gcc.TruthXorExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.TypeExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">TypeExpr</tt><a class="headerlink" href="#gcc.TypeExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.TypeidExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">TypeidExpr</tt><a class="headerlink" href="#gcc.TypeidExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.VaArgExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">VaArgExpr</tt><a class="headerlink" href="#gcc.VaArgExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.VecCondExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">VecCondExpr</tt><a class="headerlink" href="#gcc.VecCondExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.VecDlExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">VecDlExpr</tt><a class="headerlink" href="#gcc.VecDlExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.VecInitExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">VecInitExpr</tt><a class="headerlink" href="#gcc.VecInitExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.VecNwExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">VecNwExpr</tt><a class="headerlink" href="#gcc.VecNwExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.WidenMultMinusExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">WidenMultMinusExpr</tt><a class="headerlink" href="#gcc.WidenMultMinusExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.WidenMultPlusExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">WidenMultPlusExpr</tt><a class="headerlink" href="#gcc.WidenMultPlusExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-even"><td><dl class="first last class"> <dt id="gcc.WithCleanupExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">WithCleanupExpr</tt><a class="headerlink" href="#gcc.WithCleanupExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> <tr class="row-odd"><td><dl class="first last class"> <dt id="gcc.WithSizeExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">WithSizeExpr</tt><a class="headerlink" href="#gcc.WithSizeExpr" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </td> <td> </td> </tr> </tbody> </table> </div></blockquote> </dd></dl> <p>TODO</p> </div> <div class="section" id="statements"> <h2>Statements<a class="headerlink" href="#statements" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="gcc.Statement"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">Statement</tt><a class="headerlink" href="#gcc.Statement" title="Permalink to this definition">¶</a></dt> <dd><p>A subclass of <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a> for statements</p> <p>Corresponds to the <cite>tcc_statement</cite> value of <cite>enum tree_code_class</cite> within GCC’s own C sources.</p> </dd></dl> <dl class="class"> <dt id="gcc.CaseLabelExpr"> <em class="property">class </em><tt class="descclassname">gcc.</tt><tt class="descname">CaseLabelExpr</tt><a class="headerlink" href="#gcc.CaseLabelExpr" title="Permalink to this definition">¶</a></dt> <dd><blockquote> <div><p>A subclass of <a class="reference internal" href="#gcc.Statement" title="gcc.Statement"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Statement</span></tt></a> for the <cite>case</cite> and <cite>default</cite> labels within a <cite>switch</cite> statement.</p> <dl class="attribute"> <dt id="gcc.CaseLabelExpr.low"> <tt class="descname">low</tt><a class="headerlink" href="#gcc.CaseLabelExpr.low" title="Permalink to this definition">¶</a></dt> <dd><ul class="simple"> <li>for single-valued case labels, the value, as a <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a></li> <li>for range-valued case labels, the lower bound, as a <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a></li> <li><cite>None</cite> for the default label</li> </ul> </dd></dl> <dl class="attribute"> <dt id="gcc.CaseLabelExpr.high"> <tt class="descname">high</tt><a class="headerlink" href="#gcc.CaseLabelExpr.high" title="Permalink to this definition">¶</a></dt> <dd><p>For range-valued case labels, the upper bound, as a <a class="reference internal" href="#gcc.Tree" title="gcc.Tree"><tt class="xref py py-class docutils literal"><span class="pre">gcc.Tree</span></tt></a>.</p> <p><cite>None</cite> for single-valued case labels, and for the default label</p> </dd></dl> <dl class="attribute"> <dt id="gcc.CaseLabelExpr.target"> <tt class="descname">target</tt><a class="headerlink" href="#gcc.CaseLabelExpr.target" title="Permalink to this definition">¶</a></dt> <dd><p>The target of the case label, as a <tt class="xref py py-class docutils literal"><span class="pre">gcc.LabelDecl</span></tt></p> </dd></dl> </div></blockquote> </dd></dl> </div> </div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h3><a href="index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">gcc.Tree and its subclasses</a><ul> <li><a class="reference internal" href="#blocks">Blocks</a></li> <li><a class="reference internal" href="#declarations">Declarations</a></li> <li><a class="reference internal" href="#types">Types</a></li> <li><a class="reference internal" href="#constants">Constants</a></li> <li><a class="reference internal" href="#binary-expressions">Binary Expressions</a></li> <li><a class="reference internal" href="#unary-expressions">Unary Expressions</a></li> <li><a class="reference internal" href="#comparisons">Comparisons</a></li> <li><a class="reference internal" href="#references-to-storage">References to storage</a></li> <li><a class="reference internal" href="#other-expression-subclasses">Other expression subclasses</a></li> <li><a class="reference internal" href="#statements">Statements</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="cfg.html" title="previous chapter">Working with functions and control flow graphs</a></p> <h4>Next topic</h4> <p class="topless"><a href="gimple.html" title="next chapter">Gimple statements</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/tree.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="gimple.html" title="Gimple statements" >next</a> |</li> <li class="right" > <a href="cfg.html" title="Working with functions and control flow graphs" >previous</a> |</li> <li><a href="index.html">gcc-python-plugin 0.9 documentation</a> »</li> </ul> </div> <div class="footer"> © Copyright 2011, David Malcolm. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. </div> </body> </html>