-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Description
from my application, i like to, e.g., #include <ctl/str.h>
, with a -I
pointing at some directory that includes ctl/
as a sub-directory.
but, includes to other ctl files within the ctl/
directory use "angle-bracket form", which does not look first in the directory containing the file (e.g., str.h
) doing the #include
.
i think if these angle-bracket form
includes were changed to quote form
, i.e., if
#include <vec.h>
were changed to
#include "vec.h"
all would be happy? (probably there's a downside, though?)
for background, a relevant section of the GNU cpp
info pages says
By default, the preprocessor looks for header files included by the
quote form of the directive ‘#include "FILE"’ first relative to the
directory of the current file, and then in a preconfigured list of
standard system directories. For example, if ‘/usr/include/sys/stat.h’
contains ‘#include "types.h"’, GCC looks for ‘types.h’ first in
‘/usr/include/sys’, then in its usual search path.
For the angle-bracket form ‘#include <FILE>’, the preprocessor's
default behavior is to look only in the standard system directories.
cheers.
Metadata
Metadata
Assignees
Labels
No labels