PATCH for global register error message
Andrew Haley
aph@cygnus.co.uk
Wed Oct 27 05:27:00 GMT 1999
> Date: Tue, 26 Oct 1999 02:36:46 -0600
> From: Jeffrey A Law <law@cygnus.com>
>
> In message < 19991022133445.4392.qmail@pasanda.cygnus.co.uk >you write:
> > This patch moves the error checking for global register variables from
> > varasm to regclass. The reason for this is that the C++ front end may
> > define some functions before parsing any source, thus making it
> > impossible to declare any global register variables; better to defer
> > the checking until registers are allocated.
> Is that still the case after all the work to move towards functions as
> trees for the C++ front end?
I think so, yes.
> And I'd be curious about what function gets defined before we parse
> any source -- can you give a few details about that?
Sure. C++'s init_decl_processing calls c_common_nodes_and_builtins,
which in turn defines a bunch of functions such as __builtin_constant_p.
A file which only contains a global register declaration is rejected
by the C++ compiler.
In any case, I would have thought that we should leave the prohibition
of global register variables until as late as possible.
Andrew.
More information about the Gcc-patches
mailing list