3 ms·
I can speculate: __printf(), having two leading underscores, is a named reserved for "the implementation," meaning the compiler and standard library. This enab
by jzwinck 12y ago
I can speculate: __printf(), having two leading underscores, is a named reserved for "the implementation," meaning the compiler and standard library. This enables at least one useful thing, which is that the standard library (or a third-party library I guess) can use this function when it needs to print things, and not worry that printf() has been redefined by the application.
You might think, but who in their right mind would redefine printf()? But C has an infinite number of people using it all the time, so every possible weird thing has been done a few times by now.
- DannyBee 12y ago"and not worry that printf() has been redefined by the application." Note that GCC assumes it isn't redefined unless you use -fno-builtin-printf. It will replace printf calls with puts and do other fun things.
- MaulingMonkey 12y ago> You might think, but who in their right mind would redefine printf()? One cannot discount those in their wrong mind either. I had a header dedicated to #undef ing things ruby.h redirected so I could include it in C++ contexts without breaking the SC++L. While I don't see printf on the list, read, write, close, fclose, sleep, and many more are.