public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/55534] -Wno-missing-include-dirs does not work with gfortran
Date: Wed, 22 Sep 2021 18:58:55 +0000	[thread overview]
Message-ID: <bug-55534-4-0WzGalFLGm@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55534-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55534

--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <burnus@gcc.gnu.org>:

https://gcc.gnu.org/g:83aac698835edcdb3e6d96b856bef1c5f92e5e24

commit r12-3825-g83aac698835edcdb3e6d96b856bef1c5f92e5e24
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Wed Sep 22 20:58:35 2021 +0200

    Fortran: Improve -Wmissing-include-dirs warnings [PR55534]

    It turned out that enabling the -Wmissing-include-dirs for libcpp did
output
    too many warnings â at least as run with -B and similar options during
the
    GCC build and warning for internal include dirs like finclude, unlikely of
    relevance to for a real-world user.
    This patch now only warns for -I and -J by default but permits to get the
    full warnings including libcpp ones with -Wmissing-include-dirs. It
    additionally documents this in the manual.

    With that change, the -Wno-missing-include-dirs could be removed
    from libgfortran's configure and libgomp's testsuite always cflags.
    This reverts those bits of the previous
    commit r12-3722-g417ea5c02cef7f000e66d1af22b066c2c1cda047

    Additionally, it turned out that all call to load_file called exit
    explicitly - except for the main file via gfc_init -> gfc_new_file. The
    latter also output a file not existing fatal error, such that two errors
    where printed. Now exit is called in line with the other users of
    load_file.

    Finally, when compileing with "nonexisting/file.f90", first a warning that
    "nonexisting" does not exist as include path was printed before the file
    not found error was printed. Now the directory in which the physical file
    is located is added silently, relying on the file-not-found diagnostic for
    those.

            PR fortran/55534
    gcc/ChangeLog:

            * doc/invoke.texi (-Wno-missing-include-dirs.): Document Fortran
            behavior.

    gcc/fortran/ChangeLog:

            * cpp.c (gfc_cpp_register_include_paths, gfc_cpp_post_options):
            Add new bool verbose_missing_dir_warn argument.
            * cpp.h (gfc_cpp_post_options): Update prototype.
            * f95-lang.c (gfc_init): Remove duplicated file-not found diag.
            * gfortran.h (gfc_check_include_dirs): Takes bool
            verbose_missing_dir_warn arg.
            (gfc_new_file): Returns now void.
            * options.c (gfc_post_options): Update to warn for -I and -J,
            only, by default but for all when user requested.
            * scanner.c (gfc_do_check_include_dir):
            (gfc_do_check_include_dirs, gfc_check_include_dirs): Take bool
            verbose warn arg and update to avoid printing the same message
            twice or never.
            (load_file): Fix indent.
            (gfc_new_file): Return void and exit when load_file failed
            as all other load_file users do.

    libgfortran/ChangeLog:

            * configure.ac (AM_FCFLAGS): Revert r12-3722 by removing
            -Wno-missing-include-dirs.
            * configure: Regenerate.

    libgomp/ChangeLog:

            * testsuite/libgomp.fortran/fortran.exp (ALWAYS_CFLAGS): Revert
            r12-3722 by removing -Wno-missing-include-dirs.
            * testsuite/libgomp.oacc-fortran/fortran.exp (ALWAYS_CFLAGS):
Likewise.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/include_14.f90: Add -J testcase and update dg-output.
            * gfortran.dg/include_15.f90: Likewise.
            * gfortran.dg/include_16.f90: Likewise.
            * gfortran.dg/include_17.f90: Likewise.
            * gfortran.dg/include_18.f90: Likewise.
            * gfortran.dg/include_19.f90: Likewise.

  parent reply	other threads:[~2021-09-22 18:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-29 20:31 [Bug fortran/55534] New: " anlauf at gmx dot de
2012-11-29 20:32 ` [Bug fortran/55534] " anlauf at gmx dot de
2012-12-04 23:02 ` anlauf at gmx dot de
2012-12-05  9:29 ` burnus at gcc dot gnu.org
2012-12-05 21:44 ` anlauf at gmx dot de
2012-12-06  0:04 ` burnus at gcc dot gnu.org
2012-12-07 21:10 ` anlauf at gmx dot de
2012-12-13 21:11 ` anlauf at gmx dot de
2014-09-09 21:39 ` manu at gcc dot gnu.org
2014-12-29 20:00 ` anlauf at gmx dot de
2014-12-29 21:28 ` manu at gcc dot gnu.org
2021-09-17  9:42 ` burnus at gcc dot gnu.org
2021-09-17 13:02 ` burnus at gcc dot gnu.org
2021-09-21  6:28 ` cvs-commit at gcc dot gnu.org
2021-09-21  7:13 ` burnus at gcc dot gnu.org
2021-09-22 18:58 ` cvs-commit at gcc dot gnu.org [this message]
2021-09-24  7:31 ` cvs-commit at gcc dot gnu.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-55534-4-0WzGalFLGm@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: 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).