This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/35019] Gfortran does not support "-J <dir>" only "-J<dir>"



------- Comment #6 from dfranke at gcc dot gnu dot org  2008-03-28 00:40 -------
This patch seems to finally fix the problem - but if this is the Right Way
(TM)? 

The changes in gfortranspec.c are necessary to trigger a missing-argument
message on:

$> gfortran-svn foo.f90 -J
gfortran-svn: argument to '-J' missing


Index: ../gcc.h
===================================================================
--- ../gcc.h    (revision 133396)
+++ ../gcc.h    (working copy)
@@ -35,9 +35,9 @@ struct spec_function
 #define DEFAULT_SWITCH_TAKES_ARG(CHAR) \
   ((CHAR) == 'D' || (CHAR) == 'U' || (CHAR) == 'o' \
    || (CHAR) == 'e' || (CHAR) == 'T' || (CHAR) == 'u' \
-   || (CHAR) == 'I' || (CHAR) == 'm' || (CHAR) == 'x' \
-   || (CHAR) == 'L' || (CHAR) == 'A' || (CHAR) == 'V' \
-   || (CHAR) == 'B' || (CHAR) == 'b')
+   || (CHAR) == 'I' || (CHAR) == 'J' || (CHAR) == 'm' \
+   || (CHAR) == 'x' || (CHAR) == 'L' || (CHAR) == 'A' \
+   || (CHAR) == 'V' || (CHAR) == 'B' || (CHAR) == 'b')

 /* This defines which multi-letter switches take arguments.  */

@@ -50,7 +50,8 @@ struct spec_function
   || !strcmp (STR, "iquote") || !strcmp (STR, "isystem") \
   || !strcmp (STR, "isysroot") \
   || !strcmp (STR, "-param") || !strcmp (STR, "specs") \
-  || !strcmp (STR, "MF") || !strcmp (STR, "MT") || !strcmp (STR, "MQ"))
+  || !strcmp (STR, "MF") || !strcmp (STR, "MT") || !strcmp (STR, "MQ") \
+  || !strcmp(STR, "fintrinsic-modules-path"))


 /* These are exported by gcc.c.  */
Index: gfortranspec.c
===================================================================
--- gfortranspec.c      (revision 133396)
+++ gfortranspec.c      (working copy)
@@ -175,6 +175,8 @@ lookup_option (Option *xopt, int *xskip,
     opt = OPTION_v, skip = 0;
   else if (text[1] == 'x')
     opt = OPTION_x, arg = text + 2;
+  else if (text[1] == 'J')
+    ;
   else
     {
       if ((skip = WORD_SWITCH_TAKES_ARG (text + 1)) != 0)  /* See gcc.c.  */


Not bootstrapped/regtested yet.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35019


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]