aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r--gcc/cppinit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index 13a0e64..980cdb1 100644
--- a/gcc/cppinit.c
+++ b/gcc/cppinit.c
@@ -211,10 +211,12 @@ append_include_chain (pfile, dir, path, cxx_aware)
struct stat st;
unsigned int len;
+ if (*dir == '\0')
+ dir = xstrdup (".");
_cpp_simplify_pathname (dir);
if (stat (dir, &st))
{
- /* Dirs that don't exist are silently ignored. */
+ /* Dirs that don't exist are silently ignored. */
if (errno != ENOENT)
cpp_notice_from_errno (pfile, dir);
else if (CPP_OPTION (pfile, verbose))