Thank you.

Some of the versions of GCC that I use also checks the arguments of printf etc. using the first parameter string constant, if available. When moving programs
from OS/2 to Linux, I discovered some hidden errors this way.

I think it's a good idea to have different compilers at hand; if you have a critical piece of software, use all of them. Same goes for operating systems; my C programs
should run the same way on Windows, Linux, OS/2 and z/OS ... sometimes some
errors show up only on one of the platforms ...

Kind regards

Bernd



Am 29.04.2016 um 14:49 schrieb David Crayford:
That's an excellent answer Bernd! One of the reasons why I prefer C++ over C is that iostreams are not only typesafe but they handle variable length parameter lists by simple function calls. The downside is that the extra function call overhead is more expensive so it's a trade-off. It's also significantly more verbose than a simple printf() but there are decent alternatives http://www.boost.org/doc/libs/1_60_0/libs/format/doc/format.html.

Just for fun http://www.horstmann.com/.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to