Shebang
Ian Lance Taylor
ian@wasabisystems.com
Mon Mar 8 20:51:00 GMT 2004
Zack Weinberg <zack@codesourcery.com> writes:
> > Also, are there reasons gcc won't compile directly from stdin to
> > stdout?
>
> GCC will, actually; it's the assembler and linker that won't. Try:
> gcc -S -xc - -o - < file.c > file.s.
>
> You could take this up with the binutils maintainers
> (binutils@sources.redhat.com) but I believe there are good reasons why
> this is infeasible at least for the linker.
It's feasible, for some definition of feasible. It's merely
inefficient. You have to either hold the entire output file in
memory, or you have to process each input file several times.
Ian
More information about the Gcc
mailing list