From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20220 invoked by alias); 11 Dec 2007 03:51:07 -0000 Received: (qmail 20212 invoked by uid 22791); 11 Dec 2007 03:51:07 -0000 X-Spam-Check-By: sourceware.org Received: from MGW4.Sony.CO.JP (HELO mgw4.sony.co.jp) (137.153.0.46) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 11 Dec 2007 03:51:00 +0000 Received: from mail7.sony.co.jp ([43.0.1.209]) Received: from mail7.sony.co.jp (localhost [127.0.0.1]) by mail7.sony.co.jp (R8/Sony) with ESMTP id lBB3ovLb027713 for ; Tue, 11 Dec 2007 12:50:57 +0900 (JST) Received: from smail1.sm.sony.co.jp (smail1.sm.sony.co.jp [43.11.253.1]) by mail7.sony.co.jp (R8/Sony) with ESMTP id lBB3ovYc027702 for ; Tue, 11 Dec 2007 12:50:57 +0900 (JST) Received: from imail.sm.sony.co.jp (imail.sm.sony.co.jp [43.4.141.32]) by smail1.sm.sony.co.jp (8.11.6p2/8.11.6) with ESMTP id lBB3oue21507 for ; Tue, 11 Dec 2007 12:50:56 +0900 (JST) Received: from localhost (tidal.sm.sony.co.jp [43.4.145.112]) by imail.sm.sony.co.jp (8.12.11/3.7W) with ESMTP id lBB3oupJ008376; Tue, 11 Dec 2007 12:50:56 +0900 (JST) Date: Tue, 11 Dec 2007 03:51:00 -0000 Message-Id: <20071211.124733.74756195.kaminaga@sm.sony.co.jp> To: gcc-help@gcc.gnu.org Cc: kaminaga@sm.sony.co.jp Subject: bug in -iwithprefix? From: Hiroki Kaminaga X-Mailer: Mew version 4.2 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2007-12/txt/msg00212.txt.bz2 Hi, I'm assuming -iprefix + -iwithprefix would locate DIR to same place as if specified by -idirafter, from below info gcc: `-iwithprefix DIR' `-iwithprefixbefore DIR' Append DIR to the prefix specified previously with `-iprefix', and add the resulting directory to the include search path. `-iwithprefixbefore' puts it in the same place `-I' would; `-iwithprefix' puts it where `-idirafter' would. However, it didn't with gcc-4.1.2 (FC7): (it was same with FC3, gcc-3.4.2) $ cat test.c /* this should be included by system directory's include/err.h */ #include $ cat ./include/err.h #error "Choke me" $ gcc -iprefix ./ -iwithprefix include/ -c test.c In file included from test.c:2: ./include/err.h:1:2: error: #error "Choke me" $ gcc -idirafter ./include/ -c test.c $ With -idirafter -v, include search path was: #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/lib/gcc/i386-redhat-linux/4.1.2/include /usr/include ./include/ End of search list. Whereas -iwitprefix -v, include search path was: #include "..." search starts here: #include <...> search starts here: ./include/ /usr/local/include /usr/lib/gcc/i386-redhat-linux/4.1.2/include /usr/include So, as opposed to the gcc info, -iwithprefix does not seem to put DIR where -idirafter would. Thanks in advance. Best Regards, (Hiroki Kaminaga) t --