public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kargl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/94931] request: print include path
Date: Sun, 03 May 2020 15:54:51 +0000	[thread overview]
Message-ID: <bug-94931-4-MEY3R1jzpy@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94931-4@http.gcc.gnu.org/bugzilla/>

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #1 from kargl at gcc dot gnu.org ---
(In reply to Ryo Furue from comment #0)
> I'm not familiar with this bug tracker. I mean to submit a request, not a
> bug report.
> ----
> Sorry if I missed anything, but it seems to me that there is no (official)
> way to print the list of paths which gfortran searches for include files. If
> that is correct, my request would be to provide a means to print the paths.
> 
> The `--print-search-dirs` option indicates paths only for the installation,
> executables, and libraries (It seems to me).
> 
> This discussion applies to the INCLUDE statement of the Fortran language,
> not the `#include` directive of the preprocessor.
> 
> Off-topic: I wonder if there is a discussion available online about why
> /usr/include or something like that is not searched by default? Is there a
> common (more or less standard) place for gfortran to search?

There isn't a list of paths.  With the Fortran INCLUDE statement,
by default gfortran looks in the current working directory.  That
is it.  If you have files, which are INCLUDEd, into your program 
is different directories, you can create a list of paths with the
-I option.

gfortran also searches for its own INCLUDE files and intrinsic
modules in a directory created during installation of the compiler.
You can find the name of that directory by using the -v option
during compilation.  For example, on my OS, this command

% gfcx -v -o z a.f90 | & grep -- -fin

yields

-fintrinsic-modules-path
/usr/home/kargl/work/lib/gcc/i586-unknown-freebsd13.0/10.0.0/finclude

It seems to me that an option to print the INCLUDE search
path is not needed. The PR can probably be closed as
RESOLVED WONTFIX, but I'll someone else make that decision.

  reply	other threads:[~2020-05-03 15:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-03  5:28 [Bug fortran/94931] New: " ryofurue at gmail dot com
2020-05-03 15:54 ` kargl at gcc dot gnu.org [this message]
2020-05-04  1:13 ` [Bug fortran/94931] " ryofurue at gmail dot com
2020-05-04  1:27 ` sgk at troutmask dot apl.washington.edu
2020-05-04  1:33 ` ryofurue at gmail dot com
2020-05-04  3:22 ` sgk at troutmask dot apl.washington.edu
2020-05-04  8:23 ` ryofurue at gmail dot com
2020-05-04 16:27 ` sgk at troutmask dot apl.washington.edu
2020-07-20 10:43 ` dominiq at lps dot ens.fr

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-94931-4-MEY3R1jzpy@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).