tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Static variables (grischka5)


From: Rob Landley
Subject: Re: [Tinycc-devel] Static variables (grischka5)
Date: Wed, 2 May 2007 18:06:48 -0400
User-agent: KMail/1.9.1

On Wednesday 02 May 2007 4:54 pm, David A. Wheeler wrote:
> Here's a patch that fixes a problem handling local static variables.  It
> includes the test case as well as the (one-line) actual fix.
...
> void ((*static_stub1(void ((*p)(void)))) (void))

*boggle*

It...  Er...

You have a function that takes a function pointer argument and is... returning 
a function pointer?  Ah yes, the comments say that.  (I don't think I've ever 
declared a function that returns a function pointer before.  Or seen it 
declared.  So that's what it looks like?)

Argument is pointer named p that's to a function "void p(void)".  Check.  So 
what's left would look like:

  void ((*static_stub1(xxx)) (void))

Return value is a pointer to a function "void blah(void)";  Check, I think.  
(How does anyone survive lisp?)

Right.  One line fix with evil nasty test case.

Applied.

Rob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]