option + argument in 1 or 2 words (was: getting the list of input files of a gcc command line)

Segher Boessenkool segher@kernel.crashing.org
Fri Dec 7 23:09:00 GMT 2018


On Thu, Dec 06, 2018 at 05:47:10PM +0100, Vincent Lefevre wrote:
> On 2018-12-06 09:54:00 -0600, Segher Boessenkool wrote:
> > On Thu, Dec 06, 2018 at 03:26:20AM +0100, Vincent Lefevre wrote:
> > > However, I probably wouldn't miss any input file, because all of them
> > > are actually full arguments (i.e. nothing like -Idir for files). If
> > > the wrapper considers other files like in "-o that.o", this is not an
> > > issue, because it is unlikely that such files have been opened in a
> > > text editor, and directories are not an issue either since one can
> > > easily skip them.
> > 
> > It won't miss any input files from people who didn't write weird command
> > lines.  But, for example, you can do "gcc a.c -includea.h" (note no space
> > after the -include), and that works.
> 
> Isn't this a bug? I thought that this was allowed only with options
> with a single letter, like -I.

But is this a bug that is worth fixing?  No doubt people use it
(unknowingly), given how old this is.  Shouldn't be done in stage 3,
in any case.


Segher



More information about the Gcc-help mailing list