r278872 - in /trunk/gcc: ChangeLog gcc.c

macro@gcc.gnu.org macro@gcc.gnu.org
Sat Nov 30 11:10:00 GMT 2019


Author: macro
Date: Sat Nov 30 11:10:50 2019
New Revision: 278872

URL: https://gcc.gnu.org/viewcvs?rev=278872&root=gcc&view=rev
Log:
driver: Do not warn about ineffective `-x' option if no inputs were given

Fix an issue with the GCC driver and the `-x' option where a warning is
issued in an invocation like:

$ riscv64-linux-gnu-gcc -print-multi-directory -x c++
riscv64-linux-gnu-gcc: warning: '-x c++' after last input file has no effect
lib64/lp64d
$ 

where no inputs were given and hence the use of `-x' is irrelevant.
The statement printed is also untrue as the `-x' does not come after the
last input file given that none was given.  Do not print it then if no
inputs were supplied.

	* gcc.c (process_command): Only warn about an ineffective `-x'
	option if any input files have actually been supplied.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gcc.c



More information about the Gcc-cvs mailing list