This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]