public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "lostdj at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/56686] gcc cannot find include header file
Date: Thu, 25 Apr 2013 14:09:00 -0000	[thread overview]
Message-ID: <bug-56686-4-vG0ApZ2gHk@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-56686-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56686

--- Comment #7 from lostdj at gmail dot com 2013-04-25 14:09:41 UTC ---
Created attachment 29939
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29939
testcase

It's funny that I just wanted to report almost identical issue. Can't believe
no one had encountered this before.

MinGW, GCC 4.7.0.
Attached test case is a bit different from author's original, yet similar:
"inc1.h: No such file or directory"
If you change one include path in makefile from -I./ to -I., everything
compiles without errors.

>From gcc -v with -I./:
#include "..." search starts here:
#include <...> search starts here:
 ./inc
 d:\bin\mingw\bin\../lib/gcc/mingw32/4.7.0/include
 d:\bin\mingw\bin\../lib/gcc/mingw32/4.7.0/../../../../include
 d:\bin\mingw\bin\../lib/gcc/mingw32/4.7.0/include-fixed

And -I.:
#include "..." search starts here:
#include <...> search starts here:
 ./inc
 .
 d:\bin\mingw\bin\../lib/gcc/mingw32/4.7.0/include
 d:\bin\mingw\bin\../lib/gcc/mingw32/4.7.0/../../../../include
 d:\bin\mingw\bin\../lib/gcc/mingw32/4.7.0/include-fixed

***

Aaand on Linux with GCC 4.4.6 everything is fine. No errors. 
-v -I./:
#include "..." search starts here:
#include <...> search starts here:
 ./inc/
 ./
 /usr/local/include
 /usr/lib/gcc/i686-redhat-linux/4.4.6/include
 /usr/include

-v -I.:
#include "..." search starts here:
#include <...> search starts here:
 ./inc/
 .
 /usr/local/include
 /usr/lib/gcc/i686-redhat-linux/4.4.6/include
 /usr/include

***

So whom is to blame: GCC or MinGW?


  parent reply	other threads:[~2013-04-25 14:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22  2:18 [Bug c/56686] New: " panruochen at gmail dot com
2013-03-22  2:19 ` [Bug c/56686] " panruochen at gmail dot com
2013-03-22  2:26 ` [Bug preprocessor/56686] " pinskia at gcc dot gnu.org
2013-03-22  6:54 ` ktietz at gcc dot gnu.org
2013-03-25  3:21 ` panruochen at gmail dot com
2013-03-25  3:28 ` panruochen at gmail dot com
2013-03-25  3:29 ` panruochen at gmail dot com
2013-04-25 14:09 ` lostdj at gmail dot com [this message]
2013-12-07 11:46 ` ktietz at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-56686-4-vG0ApZ2gHk@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).