Re: #include_next: wrong search order?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alexey,

>The question is why the #include_next directive in syslimits.h results in including <gcc-include-dir>/limits.h, not in including limits.h from the next directory in the search list.

Because <gcc-include-dir>/limits.h is the first one in the search list.

"This directive works like `#include' except in searching for the specified file: it starts searching the list of header file directories _after_ the directory in which the current file was found."

<syslimits.h> is not <limits.h>

The current <limits.h> file for the invocation within <syslimits.h> had not been found yet, so it starts with the first system include search path directory (i.e., <gcc-include-dir>).

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux