]> gcc.gnu.org Git - gcc.git/commitdiff
(process_command): Add "include" prefix for [blah/]stageN.
authorDoug Evans <dje@gnu.org>
Wed, 6 Apr 1994 00:04:56 +0000 (00:04 +0000)
committerDoug Evans <dje@gnu.org>
Wed, 6 Apr 1994 00:04:56 +0000 (00:04 +0000)
From-SVN: r6968

gcc/gcc.c

index 9ea6fb9bab3f3d4c041b5b37ce4cb10c8c8f5bcd..0871edb53d28cc72cbb11ad5ab2bbf9385af980d 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -2432,12 +2432,16 @@ process_command (argc, argv)
                add_prefix (&include_prefix, concat (value, "include", ""),
                            1, 0, 0);
 
-               /* As a kludge, if the arg is "stageN/", just add
+               /* As a kludge, if the arg is "[blah/]stageN/", just add
                   "include" to the include prefix.  */
-               if (strlen (value) == 7 && value[6] == '/'
-                   && strncmp (value, "stage", 5) == 0
-                   && isdigit (value[5]))
-                 add_prefix (&include_prefix, "include", 1, 0, 0);
+               {
+                 int len = strlen (value);
+                 if ((len == 7 || (len > 7 && value[len-8] == '/'))
+                     && strncmp (value+len-7, "stage", 5) == 0
+                     && isdigit (value[len-2])
+                     && value[len-1] == '/')
+                   add_prefix (&include_prefix, "include", 1, 0, 0);
+               }
              }
              break;
 
This page took 0.069457 seconds and 5 git commands to generate.