Nested functions and tail-call optimization

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

 



Hi,

Consider this function:

  static tree filter (bool (*pred) (const_tree), tree);

  static tree
  list_remove (bool (*pred) (const_tree), tree t)
  {
    bool opposite (const_tree t)
    {
      return !pred (t);
    }

    return filter (opposite, t);
  }

Here, the call to ‘filter’ is likely subject to tail-call optimization.
Is there any guarantee that ‘opposite’ is still reachable when ‘filter’
is called?

Thanks,
Ludo’.



[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