re PR fortran/35156 ([patch] Deprecate -M<dir>)
2008-04-25 Tobias Burnus <burnus@net-b.de> Daniel Franke <franke.daniel@gmail.com> PR fortran/35156 * gfortranspec.c (lang_specific_driver): Deprecate -M option; fix ICE when "-M" is last argument and make "-M<dir>" work. * options.c (gfc_handle_module_path_options): Use -J instead of -M in error messages. * invoke.texi: Mark -M as depecated. Co-Authored-By: Daniel Franke <franke.daniel@gmail.com> From-SVN: r134680
This commit is contained in:
parent
9ae83b8456
commit
ccc2ed8715
4 changed files with 32 additions and 17 deletions
|
@ -1,3 +1,14 @@
|
|||
2008-04-25 Tobias Burnus <burnus@net-b.de>
|
||||
Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
PR fortran/35156
|
||||
* gfortranspec.c (lang_specific_driver): Deprecate
|
||||
-M option; fix ICE when "-M" is last argument and
|
||||
make "-M<dir>" work.
|
||||
* options.c (gfc_handle_module_path_options):
|
||||
Use -J instead of -M in error messages.
|
||||
* invoke.texi: Mark -M as depecated.
|
||||
|
||||
2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
||||
|
||||
|
|
|
@ -429,18 +429,27 @@ For more information about these matters, see the file named COPYING\n\n"));
|
|||
{
|
||||
char *p;
|
||||
|
||||
fprintf (stderr, _("Warning: Using -M <directory> is deprecated, "
|
||||
"use -J instead\n"));
|
||||
if (argv[i][2] == '\0')
|
||||
{
|
||||
p = XNEWVEC (char, strlen (argv[i + 1]) + 2);
|
||||
p[0] = '-';
|
||||
p[1] = 'J';
|
||||
strcpy (&p[2], argv[i + 1]);
|
||||
i++;
|
||||
if (i+1 < argc)
|
||||
{
|
||||
p = XNEWVEC (char, strlen (argv[i + 1]) + 3);
|
||||
p[0] = '-';
|
||||
p[1] = 'J';
|
||||
strcpy (&p[2], argv[i + 1]);
|
||||
i++;
|
||||
}
|
||||
else
|
||||
fatal ("argument to '%s' missing", argv[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
p = XNEWVEC (char, strlen (argv[i]) + 1);
|
||||
strcpy (p, argv[i]);
|
||||
p[0] = '-';
|
||||
p[1] = 'J';
|
||||
strcpy (&p[2], argv[i] + 2);
|
||||
}
|
||||
append_arg (p);
|
||||
continue;
|
||||
|
|
|
@ -633,10 +633,10 @@ compiled modules are required by a @code{USE} statement.
|
|||
gcc,Using the GNU Compiler Collection (GCC)}, for information on the
|
||||
@option{-I} option.
|
||||
|
||||
@item -M@var{dir}
|
||||
@item -J@var{dir}
|
||||
@opindex @code{M}@var{dir}
|
||||
@item -M@var{dir}
|
||||
@opindex @code{J}@var{dir}
|
||||
@opindex @code{M}@var{dir}
|
||||
@cindex paths, search
|
||||
@cindex module search path
|
||||
This option specifies where to put @file{.mod} files for compiled modules.
|
||||
|
@ -645,8 +645,7 @@ statement.
|
|||
|
||||
The default is the current directory.
|
||||
|
||||
@option{-J} is an alias for @option{-M} to avoid conflicts with existing
|
||||
GCC options.
|
||||
@option{-M} is deprecated to avoid conflicts with existing GCC options.
|
||||
|
||||
@item -fintrinsic-modules-path @var{dir}
|
||||
@opindex @code{fintrinsic-modules-path} @var{dir}
|
||||
|
|
|
@ -391,10 +391,7 @@ gfc_handle_module_path_options (const char *arg)
|
|||
{
|
||||
|
||||
if (gfc_option.module_dir != NULL)
|
||||
gfc_fatal_error ("gfortran: Only one -M option allowed");
|
||||
|
||||
if (arg == NULL)
|
||||
gfc_fatal_error ("gfortran: Directory required after -M");
|
||||
gfc_fatal_error ("gfortran: Only one -J option allowed");
|
||||
|
||||
gfc_option.module_dir = (char *) gfc_getmem (strlen (arg) + 2);
|
||||
strcpy (gfc_option.module_dir, arg);
|
||||
|
@ -718,14 +715,13 @@ gfc_handle_option (size_t scode, const char *arg, int value)
|
|||
break;
|
||||
|
||||
case OPT_J:
|
||||
case OPT_M:
|
||||
gfc_handle_module_path_options (arg);
|
||||
break;
|
||||
|
||||
|
||||
case OPT_fsign_zero:
|
||||
gfc_option.flag_sign_zero = value;
|
||||
break;
|
||||
|
||||
|
||||
case OPT_ffpe_trap_:
|
||||
gfc_handle_fpe_trap_option (arg);
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue