Gdc & avr

Iain Buclaw ibuclaw at
Fri Feb 3 11:58:26 PST 2012

On 3 February 2012 19:32, Manu <turkeyman at> wrote:
> On 3 February 2012 16:45, Paulo Pinto <pjmlp at> wrote:
>> The only language without runtime is pure assembly.
> And C.. there's no requirement to link the CRT in a C app. In fact, in many
> of my projects, I don't.
> I frequently find that the ONLY function I use from the CRT is sprintf...
> which I really should write(/copy) my own version of, so I can never link a
> CRT again :P
>> All high level languages require a runtime library, even C, despite what
>> many people think.
> Wrong, the C language depends on NOTHING in the CRT. I prefer to avoid
> linking it wherever possible. Strangely enough, I find the 'standard' C
> library to be one of the least standard libraries out there, and avoid it
> for that reason.

When building without -nostdlib, the compiler can make some
assumptions on the fact that it is being linked to libc.  I'm not sure
if it is still the case, but I've seen Linux devs work around areas
where gcc will implicitly put in calls to memcpy on some rather costly
copy assignments.

Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';

More information about the Digitalmars-d mailing list