public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] gnatmake crashes with -cargs -m -margs -m
@ 2012-03-19 16:42 Arnaud Charlet
  0 siblings, 0 replies; only message in thread
From: Arnaud Charlet @ 2012-03-19 16:42 UTC (permalink / raw)
  To: gcc-patches; +Cc: Vincent Celier

[-- Attachment #1: Type: text/plain, Size: 333 bytes --]

This patch ensures that gnatmake no longer crashes when there are -m
switches after -cargs and after -margs on the command line.

Tested on x86_64-pc-linux-gnu, committed on trunk

2012-03-19  Vincent Celier  <celier@adacore.com>

	* make.adb (Scan_Make_Arg): Make sure all significant -m switches
	on the command line are counted.


[-- Attachment #2: difs --]
[-- Type: text/plain, Size: 674 bytes --]

Index: make.adb
===================================================================
--- make.adb	(revision 185520)
+++ make.adb	(working copy)
@@ -7423,6 +7423,16 @@
 
          Add_Switch (Argv, Program_Args, And_Save => And_Save);
 
+         --  Make sure that all significant switches -m on the command line
+         --  are counted.
+
+         if Argv'Length > 2
+           and then Argv (1 .. 2) = "-m"
+           and then Argv /= "-mieee"
+         then
+            N_M_Switch := N_M_Switch + 1;
+         end if;
+
       --  Handle non-default compiler, binder, linker, and handle --RTS switch
 
       elsif Argv'Length > 2 and then Argv (1 .. 2) = "--" then

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-03-19 16:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-19 16:42 [Ada] gnatmake crashes with -cargs -m -margs -m Arnaud Charlet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).