This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
"self" keyword
- From: "Rick C. Hodgin" <foxmuldrster at yahoo dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 14 Jun 2012 11:09:48 -0400
- Subject: "self" keyword
How hard would it be to implement a "self" keyword extension which
references the contextual function name wherein it was referenced?
int foo(int a)
{
// recursion
self(a + 1);
}
int food(int a)
{
// recursion
self(a + 1);
}
Obviously not a useful example, but demonstrates that to call each
function it's in again that it can be done without knowing the function
name.
Best regards,
Rick C. Hodgin