mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-21 16:00:58 +08:00
Fix PR 54033, problems with -I, with test cases
PR fortran/54033 * scanner.c (add_path_to_list): New argument warn. Don't warn if it is true. (gfc_add_include_path): Warn if directory is missing. (gfc_add_intrinsic_modules_path): Do not warn if directory is missing. * optinons.c (gfc_handle_option): Do not add directory for intrinsic modules to normal include path. From-SVN: r190144
This commit is contained in:
parent
6f34864a43
commit
57bdf399d4
@ -1,3 +1,14 @@
|
||||
2012-08-02 Thomas König <tkoenig@gcc.gnu.org>
|
||||
|
||||
PR fortran/54033
|
||||
* scanner.c (add_path_to_list): New argument warn. Don't
|
||||
warn if it is true.
|
||||
(gfc_add_include_path): Warn if directory is missing.
|
||||
(gfc_add_intrinsic_modules_path): Do not warn if directory
|
||||
is missing.
|
||||
* optinons.c (gfc_handle_option): Do not add directory
|
||||
for intrinsic modules to normal include path.
|
||||
|
||||
2012-08-03 Mikael Morin <mikael@gcc.gnu.org>
|
||||
|
||||
PR fortran/54166
|
||||
@ -697,8 +708,8 @@
|
||||
|
||||
2012-05-05 Janne Blomqvist <jb@gcc.gnu.org>
|
||||
|
||||
* gfortran.texi (GFORTRAN_TMPDIR): Rename to TMPDIR, explain
|
||||
algorithm for choosing temp directory.
|
||||
* gfortran.texi (GFORTRAN_TMPDIR): Rename to TMPDIR, explain
|
||||
algorithm for choosing temp directory.
|
||||
|
||||
2012-05-04 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
|
@ -819,7 +819,6 @@ gfc_handle_option (size_t scode, const char *arg, int value,
|
||||
break;
|
||||
|
||||
case OPT_fintrinsic_modules_path:
|
||||
gfc_add_include_path (arg, false, false);
|
||||
gfc_add_intrinsic_modules_path (arg);
|
||||
break;
|
||||
|
||||
|
@ -307,7 +307,7 @@ gfc_scanner_done_1 (void)
|
||||
|
||||
static void
|
||||
add_path_to_list (gfc_directorylist **list, const char *path,
|
||||
bool use_for_modules, bool head)
|
||||
bool use_for_modules, bool head, bool warn)
|
||||
{
|
||||
gfc_directorylist *dir;
|
||||
const char *p;
|
||||
@ -324,8 +324,11 @@ add_path_to_list (gfc_directorylist **list, const char *path,
|
||||
gfc_warning_now ("Include directory \"%s\": %s", path,
|
||||
xstrerror(errno));
|
||||
else
|
||||
/* FIXME: Also support -Wmissing-include-dirs. */
|
||||
gfc_warning_now ("Nonexistent include directory \"%s\"", path);
|
||||
{
|
||||
/* FIXME: Also support -Wmissing-include-dirs. */
|
||||
if (warn)
|
||||
gfc_warning_now ("Nonexistent include directory \"%s\"", path);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (!S_ISDIR (st.st_mode))
|
||||
@ -363,7 +366,7 @@ add_path_to_list (gfc_directorylist **list, const char *path,
|
||||
void
|
||||
gfc_add_include_path (const char *path, bool use_for_modules, bool file_dir)
|
||||
{
|
||||
add_path_to_list (&include_dirs, path, use_for_modules, file_dir);
|
||||
add_path_to_list (&include_dirs, path, use_for_modules, file_dir, true);
|
||||
|
||||
/* For '#include "..."' these directories are automatically searched. */
|
||||
if (!file_dir)
|
||||
@ -374,7 +377,7 @@ gfc_add_include_path (const char *path, bool use_for_modules, bool file_dir)
|
||||
void
|
||||
gfc_add_intrinsic_modules_path (const char *path)
|
||||
{
|
||||
add_path_to_list (&intrinsic_modules_dirs, path, true, false);
|
||||
add_path_to_list (&intrinsic_modules_dirs, path, true, false, false);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user