[cfe-dev] why <<<NULL>>> in AST dump
Philip Craig
philipjcraig at gmail.com
Wed Dec 26 01:26:08 PST 2012
On Wed, Dec 26, 2012 at 6:54 PM, Rajendra <rks at cse.iitb.ac.in> wrote:
> Hi,
>
> I am wondering why there is <<<NULL>>> printed in AST dump
>
> (IfStmt 0xb828598 <line:8:3, line:13:10>
> <<<NULL>>>
>
> for code below and I see the same happening in case of while stmt?
These statements can optionally have a condition variable, such as in:
if (int i = foo()) { ... }
The first child of the statement is the DeclStmt for the condition
variable. If there is no condition variable, then <<<NULL>>> is
printed instead.
>
> int main()
> {
> int x, y;
>
> x = 10;
>
> if (x > 0)
> y = 1;
> else if (x == 0)
> y = 0;
> else
> y = -1;
>
> return 0;
> }
>
> Why?
>
> - Rajendra
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list