From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7216 invoked by alias); 5 Dec 2012 09:29:28 -0000 Received: (qmail 7170 invoked by uid 48); 5 Dec 2012 09:29:09 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/55534] -Wno-missing-include-dirs does not work with gfortran Date: Wed, 05 Dec 2012 09:29:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-12/txt/msg00439.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55534 Tobias Burnus changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org, | |tkoenig at gcc dot gnu.org --- Comment #2 from Tobias Burnus 2012-12-05 09:29:08 UTC --- (See PR 54033 for the patch which originally added this feature.) Untested patch. --- a/gcc/fortran/cpp.c +++ b/gcc/fortran/cpp.c @@ -471,2 +471,3 @@ gfc_cpp_post_options (void) cpp_option->preprocessed = gfc_option.flag_preprocessed; + cpp_option->warn_missing_include_dirs = gfc_option.warn_missing_include_dirs; diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index bf767b2..6f3515f 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -2236,2 +2236,3 @@ typedef struct int warn_target_lifetime; + int warn_missing_include_dirs; int max_errors; diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index e05b935..489d1ff 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -117,2 +117,3 @@ gfc_init_options (unsigned int decoded_options_count, gfc_option.warn_target_lifetime = 0; + gfc_option.warn_missing_include_dirs = 0; gfc_option.max_errors = 25; @@ -478,2 +485,3 @@ set_Wall (int setting) gfc_option.warn_target_lifetime = setting; + gfc_option.warn_missing_include_dirs = setting; @@ -686,2 +694,6 @@ gfc_handle_option (size_t scode, const char *arg, int value, + case OPT_Wmissing_include_dirs: + gfc_option.warn_missing_include_dirs = value; + break; + case OPT_Wrealloc_lhs: diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c index 765c0f9..2bdd87f 100644 --- a/gcc/fortran/scanner.c +++ b/gcc/fortran/scanner.c @@ -327,4 +327,3 @@ add_path_to_list (gfc_directorylist **list, const char *path, { - /* FIXME: Also support -Wmissing-include-dirs. */ - if (warn) + if (warn && gfc_option.warn_missing_include_dirs) gfc_warning_now ("Nonexistent include directory \"%s\"", path);