public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109988] New: -iwithprefix doesn't add folder to end of search list
@ 2023-05-26 12:42 ivan.lazaric.gcc at gmail dot com
  2023-05-26 13:22 ` [Bug c++/109988] " ivan.lazaric.gcc at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ivan.lazaric.gcc at gmail dot com @ 2023-05-26 12:42 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109988
           Summary: -iwithprefix doesn't add folder to end of search list
           Product: gcc
           Version: 11.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ivan.lazaric.gcc at gmail dot com
  Target Milestone: ---

```
echo | g++ -iprefix "./" -iwithprefix "."  -E -v -
```

Snippet of output:
```
#include <...> search starts here:
 ./.
 /usr/lib/gcc/x86_64-linux-gnu/11/include
 /usr/local/include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
```

Issue is that "./." is at the front of the list, should be at bottom.

Snippet of `man g++`:
```
-iprefix prefix
           Specify prefix as the prefix for subsequent -iwithprefix options. 
If the prefix
           represents a directory, you should include the final /.

       -iwithprefix dir
       -iwithprefixbefore dir
           Append dir to the prefix specified previously with -iprefix, and add
the
           resulting directory to the include search path.  -iwithprefixbefore
puts it in
           the same place -I would; -iwithprefix puts it where -idirafter
would.
```

^ implying `-iwithprefix` should behave like `-idirafter`

`echo | g++ -idirafter "./." -E -v -`:
```
#include <...> search starts here:
 /usr/lib/gcc/x86_64-linux-gnu/11/include
 /usr/local/include
 /usr/include/x86_64-linux-gnu
 /usr/include
 ./.
End of search list.
```

Related to: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34502

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

end of thread, other threads:[~2023-05-27  0:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-26 12:42 [Bug c++/109988] New: -iwithprefix doesn't add folder to end of search list ivan.lazaric.gcc at gmail dot com
2023-05-26 13:22 ` [Bug c++/109988] " ivan.lazaric.gcc at gmail dot com
2023-05-26 17:42 ` [Bug preprocessor/109988] " pinskia at gcc dot gnu.org
2023-05-27  0:42 ` ivan.lazaric.gcc at gmail dot com

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