gcc mode: error in case multiple files are given with -c and -o
This commit is contained in:
parent
d42054a29b
commit
694daaf328
|
@ -0,0 +1,7 @@
|
|||
CORE
|
||||
|
||||
-c main1.c main2.c -o outfile
|
||||
^EXIT=1$
|
||||
^SIGNAL=0$
|
||||
^cannot specify -o with -c with multiple files$
|
||||
--
|
|
@ -0,0 +1 @@
|
|||
// blank
|
|
@ -0,0 +1 @@
|
|||
// blank
|
|
@ -723,6 +723,14 @@ int gcc_modet::doit()
|
|||
}
|
||||
}
|
||||
|
||||
if(
|
||||
cmdline.isset('o') && cmdline.isset('c') &&
|
||||
compiler.source_files.size() >= 2)
|
||||
{
|
||||
error() << "cannot specify -o with -c with multiple files" << eom;
|
||||
return 1; // to match gcc's behaviour
|
||||
}
|
||||
|
||||
// Revert to gcc in case there is no source to compile
|
||||
// and no binary to link.
|
||||
|
||||
|
|
Loading…
Reference in New Issue