From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id 69548385840A for ; Sun, 24 Jul 2022 19:26:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 69548385840A Received: by mail-ed1-x52d.google.com with SMTP id p5so607585edi.12 for ; Sun, 24 Jul 2022 12:26:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mDZ83z8B2m+zi8a6VixLnG3vVg+mFkbikbJXVXuj71Y=; b=cRiiUxYSvzbzVzfH2U4v7KKeasyHwQgVsGMvmE1AjvrSKvFCkoxBODZPveOFbyW8vz OBj5qtUBYlC5r5YFqxmdjD8A3/HKt2eFIp4R52v10X1nbMbN9ebS0nYdZtuZeHfjpqba Rn9XXbEKYsiqfn5//GXURpJ3H5z++1MsiBMVWRUJHzh/F6d9eCdllPZCSZWn+3sfnztz 13yoBpqYPqlJkbeQTPQYubLkemM8MW1Pt13XvtyJypXuDkmA65zr2l+/11OqfIiCW6Ji BtagdMiuXIHLBQHqHoWFZnFyZK1gAl08iQe428OOrA1jvHjhdl9D46Fzo78sezGZ8d6+ /7lg== X-Gm-Message-State: AJIora8p5QNUDVR3ybPJyFdd8EDcCDe5zxLMDZyo0K/lmxUCWGVB3sp7 393rTybBd7zUNfCCT+346amZpvowqokgR/FcIRA= X-Google-Smtp-Source: AGRyM1sRUXJKXFjXj1IbAV4kNz1T9pbUxqCJKwJrgH2ScEstYC8Z9cdXP3VMvMEex26o9Ts4QM+PtcldIYwnpzxZ+UY= X-Received: by 2002:a05:6402:2924:b0:43b:c6b6:a1f4 with SMTP id ee36-20020a056402292400b0043bc6b6a1f4mr9838078edb.301.1658690768999; Sun, 24 Jul 2022 12:26:08 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Sun, 24 Jul 2022 20:25:57 +0100 Message-ID: Subject: Re: Empty element in CPATH variable To: aiishymanel@tutanota.com Cc: Gcc Help X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2022 19:26:12 -0000 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 >