This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Shebang
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