Re: C-frontend NOP_EXPR help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Markus Lottmann <lottvomschlott@xxxxxx> writes:

> That works so far but not for empty do-loops with an always false condition:
>     do {
>
>     } while(0);
>
> In this case in c-typeck.c:c_finish_loop() nothing is added to the
> frontend internal tree.
> My question is: Is it possible to add a NOP_EXPR, which has no further
> children, to the current
> statement list. If yes how?

Just do something like
    add_stmt (build1 (NOP_EXPR, void_type_node, integer_zero_node));
See many existing examples.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux