This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ObjC vs function-at-a-time
Mark Mitchell wrote:
>
> Are the decls you're synthesizing functions or variables? If they're
> variables, then we shouldn't be trying to build statement-trees for
> them, and the problem to solve is why start_decl/finish_decl are doing
> that.
They're variables (usually, depends on runtime support available),
but start_decl wants to create a decl statement because there's a
synthetic function created for other reasons, and so start_decl
thinks it's declaring locals. I don't yet know whether start_decl
needs to get smarter, or if the synthetic function should be tied
off before it starts in on protocol layout.
It's all especially entertaining because the NeXT runtime has a
bunch of machinery to interpret data structures, while the GNU
runtime expects the data structures to be set up by little
constructor functions that it synthesizes. So -fnext-runtime
and -fgnu-runtime have a hand in deciding whether there are
functions hanging about.
Stan