From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from w1.tutanota.de (w1.tutanota.de [81.3.6.162]) by sourceware.org (Postfix) with ESMTPS id E31A03858C39 for ; Sun, 24 Jul 2022 12:40:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E31A03858C39 Received: from w3.tutanota.de (unknown [192.168.1.164]) by w1.tutanota.de (Postfix) with ESMTP id 6185BFBF8B9 for ; Sun, 24 Jul 2022 12:40:48 +0000 (UTC) Date: Sun, 24 Jul 2022 14:40:48 +0200 (CEST) From: aiishymanel@tutanota.com To: Gcc Help Message-ID: Subject: Empty element in CPATH variable MIME-Version: 1.0 X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_20, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, KAM_SHORT, SPF_HELO_PASS, 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 Content-Transfer-Encoding: 7bit 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 12:40:55 -0000 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. 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. Thanks, Andrii