Liste des Groupes | Revenir à l c |
On 13/03/2024 16:15, Keith Thompson wrote:Michael S <already5chosen@yahoo.com> writes:>
[...]I just tried three compilers and [in absence of -I options] all 3 workAccording to the GNU cpp manual, the "-I" option prepends
as expected, i.e. ignored stdio.h in current directory.
None of the three was of the variety that you appear to prefer.
Mine's are mundane stuff.
>
However all three took local file when I had given them an option -I.
Not sure what to make of this. Whatever happens with
non-default options is probably in "implementation-defined"
domain as far as the C Standard is concerned, but I still
expected that such common option as -I would not affect standard
headers.
directories to
the search path used for <> headers, and the "-iquote" option prepends
directories to the search path used for "" headers.
I find that a bit surprising.
You are not quite correct - and I find /that/ a bit surprising!
>
The -I option applies equally to <...> and "..." headers.
The complete description is here:[...]
<https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html>.
1. For the quote form of the include directive, the directory of
the current file is searched first.
>
2. For the quote form of the include directive, the directories
specified by -iquote options are searched in left-to-right
order, as they appear on the command line.
>
3. Directories specified with -I options are scanned in
left-to-right order.
>
4. Directories specified with -isystem options are scanned in
left-to-right order.
>
5. Standard system directories are scanned.
>
6. Directories specified with -idirafter options are scanned in
left-to-right order.
Les messages affichés proviennent d'usenet.