[M3devel] Code generation (was: Enumeration or subrange value out of range)
Hendrik Boom
hendrik at topoi.pooq.com
Thu Dec 2 19:08:41 CET 2010
On Thu, Dec 02, 2010 at 02:48:35PM +0000, Jay K wrote:
>
> > Are either LLVN or gcc-intermediate as well-documented as C--, C, or
> > C++?
> > Too bad C-- seems to be somewhat lacking in implementatins of multiple
> > kinds of hardware. It's otherwise excellent.
>
>
> gcc-intermediate isn't necessarily poorly documented or changes much,
> but C and C++ are clearly the better documented forms.
> Just go to a bookstore.
>
>
> And even if they weren't better documented, there is much broader
> experience with them, by me and the wider world.
>
>
> It's a numbers thing. I have written thousands of lines of C and C++
> and overall millions or billions have been written.
>
>
> Most of mine have been compiled by one line of compilers, but not all,
> and, in reality, I don't believe a backend would use the language(s)
> very intensely. The main reason I advocate C++ as a target vs. C
> is for portable efficient exception handling.
> (As well, Visual C++ I think is closer to the standard in terms
> of lack of extensions than gcc; I have also compiled some code
> with its /Za switch that disables extensions.)
>
>
> I should point out that nested functions will probably pose a small problem.
> Using "this" in C++ might help some, esp. to get the extra parameter efficiently
> passed on 32bit x86.
I've used "this" trick for environments in a language in which almost
every source line resulted in multiple functions, each with
its own environment. I ended up with a huge number of classes and
enormous link times. I'm not at all sure that the many classes were the
cause of the link times.
That was about 20 years ago.
-- hendrik
More information about the M3devel
mailing list