Re: gcc detect multiple -o passed on one command line

2011-05-08 Thread Jon Grant
Dave Korn wrote, On 07/05/11 16:01: 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

Re: gcc detect multiple -o passed on one command line

2011-05-08 Thread Robert Dewar
On 5/8/2011 6:23 PM, Jon Grant wrote: Hello Would it be useful to have an option to enable warning if there are duplicates? From my point of view, I feel that not warning duplicates may let mistakes in the way gcc is invoked slip through, e.g. assist tracking down these issues in makefiles.

Re: gcc detect multiple -o passed on one command line

2011-05-07 Thread Dave Korn
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

Re: gcc detect multiple -o passed on one command line

2011-05-06 Thread Andreas Schwab
Ian Lance Taylor i...@google.com 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

gcc detect multiple -o passed on one command line

2011-05-05 Thread Jon Grant
Hello Is it expected that more than one -o option should be allowed by GCC on command line? The later -o option overriding earlier. I had expected the parameter checking to detect this duplication of options. gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3 $ gcc -W -Wall -o main main.c -omup.o $ ls main.c

Re: gcc detect multiple -o passed on one command line

2011-05-05 Thread Ian Lance Taylor
Jon Grant j...@jguk.org writes: Is it expected that more than one -o option should be allowed by GCC on command line? The later -o option overriding earlier. Yes, this is expected. Most Unix utilities behave that way: when an option with an argument is specified twice, and it only makes sense

Re: gcc detect multiple -o passed on one command line

2011-05-05 Thread Bernd Schmidt
On 05/05/2011 11:53 PM, Ian Lance Taylor wrote: Jon Grant j...@jguk.org writes: Is it expected that more than one -o option should be allowed by GCC on command line? The later -o option overriding earlier. Yes, this is expected. Most Unix utilities behave that way: when an option with an

Re: gcc detect multiple -o passed on one command line

2011-05-05 Thread Ian Lance Taylor
Bernd Schmidt ber...@codesourcery.com writes: On 05/05/2011 11:53 PM, Ian Lance Taylor wrote: Jon Grant j...@jguk.org writes: Is it expected that more than one -o option should be allowed by GCC on command line? The later -o option overriding earlier. Yes, this is expected. Most Unix