public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Empty element in CPATH variable
@ 2022-07-24 12:40 aiishymanel
  2022-07-24 19:25 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: aiishymanel @ 2022-07-24 12:40 UTC (permalink / raw)
  To: Gcc Help

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-24 19:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-24 12:40 Empty element in CPATH variable aiishymanel
2022-07-24 19:25 ` Jonathan Wakely

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).