This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc detect multiple -o passed on one command line
On 06/05/2011 09:00, Andreas Schwab wrote:
> Ian Lance Taylor writes:
>
>> The difference is that with -E the -o option is passed to cc1, whereas
>> without it the -o option is passed to the assembler or the linker. The
>> GNU assembler and linker both have the usual Unix behaviour of only
>> using the last -o option.
>
> Nevertheless it might be a good idea to file a bug for binutils.
> Consistency is probably more important, and it helps in case of typos.
In this case, I don't think consistency should win over maintaining
long-established behaviour. I'm more inclined to say that cc1 should change
to follow long-established *nix tradition. (I have absolutely found it useful
on at least one occasion to be able to add a -o option into CFLAGS and know it
would come last on the command-line and win.)
cheers,
DaveK