public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: aiishymanel@tutanota.com
Cc: Gcc Help <gcc-help@gcc.gnu.org>
Subject: Re: Empty element in CPATH variable
Date: Sun, 24 Jul 2022 20:25:57 +0100	[thread overview]
Message-ID: <CAH6eHdS6_c5AAevQB691Py4w0Jco+OX65dzDoR3mBJ6Xsjg1fA@mail.gmail.com> (raw)
In-Reply-To: <N7kDMBZ--3-2@tutanota.com>

On Sun, 24 Jul 2022, 13:41 aiishymanel--- via Gcc-help, <
gcc-help@gcc.gnu.org> wrote:

> Hi everyone,
>
> the documentation explicitly states that empty elements in CPATH and other
> variables that control header search path can appear at thebeginning or end
> of a list.
>
> https://gcc.gnu.org/onlinedocs/cpp/Environment-Variables.html
>
> But in reality nothing stops you from putting empty element anywhere in
> the list.
>

I think the idea is that it's obvious that "::" in the middle is an empty
path, but it's saying that it can also appear at the ends, like ":foo".



> export CPATH="$HOME/include::$HOME/project/include"
>
> cpp -nostdinc /dev/null -o /dev/null -v 2>&1 | awk '/#include/,/End/'
>
> #include "..." search starts here:
> #include <...> search starts here:
> /root/include
> .
> /root/project/include
> End of search list.
>
> In general I would not consider it to be a bug, but the accent on the
> beginning and end of the list makes me wonder it it is a bug or a bad
> description.
>

I suppose it could say empty elements can appear anywhere, including the
beginning or end.



> Thanks,
> Andrii
>

      reply	other threads:[~2022-07-24 19:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-24 12:40 aiishymanel
2022-07-24 19:25 ` Jonathan Wakely [this message]

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=CAH6eHdS6_c5AAevQB691Py4w0Jco+OX65dzDoR3mBJ6Xsjg1fA@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=aiishymanel@tutanota.com \
    --cc=gcc-help@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).