Why is the identifier "printf" known by the frontend?

Anders F Björklund afb at algonet.se
Thu Oct 26 03:28:25 PDT 2006


Wolfgang Draxinger wrote:

> Until now I always imported std.stdio to get printf, but today I
> compiled a program where I forgot that, so fwrite, fread and the
> other std.c.stdio functions were missing. But not printf;
> obviously it is made avaliable by the compiler, which I don't
> understand, since eventually you don't want to use printf in
> your programs (for whatever reason) or want to implement a
> alternative.

It's in object.d. And that's a bug.

> What is the reason for that? "import std.stdio" is not a real
> difficult thing to type.

It is known: digitalmars.D.bugs/763

--anders



More information about the Digitalmars-d mailing list