[PATCH 2/2] cgcc: -MF, -MQ & -MT need an argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These flags expect an argument. So, the following element in
'@ARGV' must then not be considered as an option or an input file,
exactly like done for '-o FILE'.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 cgcc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cgcc b/cgcc
index 6d3b10a20..e64e8c142 100755
--- a/cgcc
+++ b/cgcc
@@ -31,10 +31,10 @@ while (@ARGV) {
     # Ditto for stdin.
     $do_check = 1 if $_ eq '-';
 
-    if ($_ eq '-o') {
-	# Need to be checked explicitly since '-o -' is
-	# sometimes used and the '-' would otherwise be
-	# processed as an option.
+    if (/^-(o|MF|MT|MQ)$/) {
+	# Need to be checked explicitly since otherwise
+	# the argument would be processed as a
+	# (non-existant) source file or as an option.
 	die ("$0: missing argument for $_") if !@ARGV;
 	$nargs = 1;
     }
-- 
2.20.1




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux