From: Thomas Koenig <tkoenig@netcologne.de>
To: Tobias Burnus <burnus@net-b.de>
Cc: Richard Guenther <richard.guenther@gmail.com>,
"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch, fortran] Fix PR 54033, problems with -I, with test cases
Date: Thu, 02 Aug 2012 20:08:00 -0000 [thread overview]
Message-ID: <501ADE29.2000206@netcologne.de> (raw)
In-Reply-To: <501A4B12.8070709@net-b.de>
[-- Attachment #1: Type: text/plain, Size: 841 bytes --]
Hi Tobias,
> I am not sure whether it is the best solution, but one possibility would
> be to ignore -fintrinsic-modules-path for the warning. (That assumes
> that the warning is (almost) never needed for an installed compiler.)
I think this is the right approach. The attached patch does this.
Regression-tested with the finclude directory from the installation.
OK for trunk?
Thomas
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.
[-- Attachment #2: regfix.diff --]
[-- Type: text/x-patch, Size: 1952 bytes --]
Index: scanner.c
===================================================================
--- scanner.c (Revision 190054)
+++ scanner.c (Arbeitskopie)
@@ -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
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
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_f
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);
}
Index: options.c
===================================================================
--- options.c (Revision 189754)
+++ options.c (Arbeitskopie)
@@ -819,7 +819,6 @@ gfc_handle_option (size_t scode, const char *arg,
break;
case OPT_fintrinsic_modules_path:
- gfc_add_include_path (arg, false, false);
gfc_add_intrinsic_modules_path (arg);
break;
next prev parent reply other threads:[~2012-08-02 20:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-26 17:16 [patch, fortran] Fix PR 54033, problems with -I Thomas Koenig
2012-07-26 18:20 ` Janis Johnson
2012-07-27 20:31 ` Thomas Koenig
2012-07-27 22:15 ` Janis Johnson
2012-07-29 12:00 ` [patch, fortran] Fix PR 54033, problems with -I, with test cases Thomas Koenig
2012-07-31 13:50 ` Tobias Burnus
2012-08-02 8:54 ` Richard Guenther
2012-08-02 9:41 ` Tobias Burnus
2012-08-02 20:08 ` Thomas Koenig [this message]
2012-08-03 17:10 ` Thomas Koenig
2012-08-04 17:31 ` H.J. Lu
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=501ADE29.2000206@netcologne.de \
--to=tkoenig@netcologne.de \
--cc=burnus@net-b.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.guenther@gmail.com \
/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: link
Be 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).