This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: patch to suggest putc/fputs over printf("string") or printf("\n")
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: patch to suggest putc/fputs over printf("string") or printf("\n")
- From: Andreas Schwab <schwab at issan dot informatik dot uni-dortmund dot de>
- Date: 15 Jan 1999 11:18:47 +0100
- Cc: law at cygnus dot com, egcs at cygnus dot com
- References: <199901131512.KAA04403@caip.rutgers.edu>
"Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:
|> Would it help to emit the following code in each module subject
|> to this optimization?
|>
|> > #ifdef __OPTIMIZE__
|> > #include <stdio.h>
|> > static FILE * __gcc_stdout __attribute__ ((__unused__)) = stdout;
|> > static inline int __gcc_putc(char c, FILE* stream)
|> > { return putc(c, stream); }
|> > #endif /* __OPTIMIZE__ */
This doesn't compile, because stdout is not suitable as an expression for
file level initializers.
--
Andreas Schwab "And now for something
schwab@issan.cs.uni-dortmund.de completely different"
schwab@gnu.org