patch to suggest putc/fputs over printf("string") or printf("\n")

Ulrich Drepper drepper@cygnus.com
Sun Jan 10 10:42:00 GMT 1999


ghazi@caip.rutgers.edu (Kaveh R. Ghazi) writes:

> Do people think that the warnings appearing below would be useful?
> 
> cccp.c:1635: warning: suggest using `putc' instead of `fprintf'
> cccp.c:2058: warning: suggest using `fputs' instead of `fprintf'
> cccp.c:10232: warning: suggest using `strcpy' instead of `sprintf'

Yes, I do think this is useful.  Otherwise the bad practice of using
printf everywhere will never die.  Printf is one or two orders of
magnitude slower than puts or similar functions.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------



More information about the Gcc-patches mailing list