public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/35019] New: Gfortran does not support "-J <dir>" only "-J<dir>" Date: Tue, 29 Jan 2008 20:35:00 -0000 [thread overview] Message-ID: <bug-35019-13404@http.gcc.gnu.org/bugzilla/> (raw) Patch (contains also a different patch, I'm to lazy to separate): The missing argument check is not needed as this is already checked for in gcc/fortran/gfortranspec.c. OPT_M is not needed as -M is changed into -J. Index: gcc/fortran/gfortranspec.c =================================================================== --- gcc/fortran/gfortranspec.c (revision 131933) +++ gcc/fortran/gfortranspec.c (working copy) @@ -89,6 +89,7 @@ OPTION_E, /* Aka --preprocess. */ OPTION_help, /* --help. */ OPTION_i, /* -imacros, -include, -include-*. */ + OPTION_J, OPTION_l, OPTION_L, /* Aka --library-directory. */ OPTION_nostdlib, /* Aka --no-standard-libraries, or @@ -160,6 +161,8 @@ opt = OPTION_E, skip = 0; else if (text[1] == 'i') opt = OPTION_i, skip = 0; + else if (text[1] == 'J') + opt = OPTION_J, skip = (text[2] == '\0'), arg = text + 2; else if (text[1] == 'l') opt = OPTION_l; else if (text[1] == 'L') @@ -368,6 +371,7 @@ case OPTION_b: case OPTION_B: case OPTION_L: + case OPTION_J: case OPTION_i: case OPTION_V: /* These options are useful in conjunction with -v to get @@ -426,7 +430,9 @@ { char *p; - if (argv[i][2] == '\0') + fprintf (stderr, _("Warning: Using -M mod_path is deprecated, " + "use -J instead\n")); + if (argv[i][2] == '\0' && i+1 < argc) { p = XNEWVEC (char, strlen (argv[i + 1]) + 2); p[0] = '-'; @@ -437,12 +443,31 @@ else { p = XNEWVEC (char, strlen (argv[i]) + 1); - strcpy (p, argv[i]); + p[0] = '-'; + p[1] = 'J'; + strcpy (&p[2], argv[i]); } append_arg (p); continue; } + if ((argv[i][0] == '-') && (argv[i][1] == 'J')) + { + if (argv[i][2] == '\0' && i+1 < argc) + { + char *p; + p = XNEWVEC (char, strlen (argv[i + 1]) + 2); + p[0] = '-'; + p[1] = 'J'; + strcpy (&p[2], argv[i + 1]); + i++; + append_arg (p); + } + else + append_arg (argv[i]); + continue; + } + if ((argv[i][0] == '-') && (argv[i][1] != 'l')) { /* Not a filename or library. */ Index: gcc/fortran/options.c =================================================================== --- gcc/fortran/options.c (revision 131933) +++ gcc/fortran/options.c (working copy) @@ -389,13 +389,7 @@ if (gfc_option.module_dir != NULL) { - gfc_status ("gfortran: Only one -M option allowed\n"); - exit (3); - } - - if (arg == NULL) - { - gfc_status ("gfortran: Directory required after -M\n"); + gfc_status ("gfortran: Only one -J option allowed\n"); exit (3); } @@ -717,7 +711,6 @@ break; case OPT_J: - case OPT_M: gfc_handle_module_path_options (arg); break; -- Summary: Gfortran does not support "-J <dir>" only "-J<dir>" Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35019
next reply other threads:[~2008-01-29 19:52 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-01-29 20:35 burnus at gcc dot gnu dot org [this message] 2008-02-04 17:36 ` [Bug fortran/35019] " fxcoudert at gcc dot gnu dot org 2008-02-06 21:50 ` dfranke at gcc dot gnu dot org 2008-02-10 14:01 ` dfranke at gcc dot gnu dot org 2008-02-10 15:13 ` dfranke at gcc dot gnu dot org 2008-03-26 21:34 ` burnus at gcc dot gnu dot org 2008-03-27 21:55 ` dfranke at gcc dot gnu dot org 2008-03-28 0:40 ` dfranke at gcc dot gnu dot org 2008-03-30 20:08 ` pinskia at gcc dot gnu dot org 2008-04-21 17:11 ` dfranke at gcc dot gnu dot org 2008-04-21 17:12 ` dfranke at gcc dot gnu dot org 2008-04-21 17:13 ` dfranke at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-35019-13404@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).