From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: CEDET calls cpp -E -dM -x c++ /dev/null Date: Fri, 03 Jul 2009 12:36:57 +0300 Message-ID: <83my7m2jly.fsf@gnu.org> References: <83vdmc2o1t.fsf@gnu.org> <83tz1v3gz3.fsf@gnu.org> <1246505665.21630.7.camel@projectile.siege-engine.com> <83ocs23muc.fsf@gnu.org> <87ocs2vbja.fsf@catnip.gol.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1246613886 5598 80.91.229.12 (3 Jul 2009 09:38:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Jul 2009 09:38:06 +0000 (UTC) Cc: eric@siege-engine.com, emacs-devel@gnu.org, miles@gnu.org To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 03 11:37:59 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MMfDR-0005ho-FL for ged-emacs-devel@m.gmane.org; Fri, 03 Jul 2009 11:37:58 +0200 Original-Received: from localhost ([127.0.0.1]:59729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MMfDQ-0004DI-Lk for ged-emacs-devel@m.gmane.org; Fri, 03 Jul 2009 05:37:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MMfCc-00047s-Er for emacs-devel@gnu.org; Fri, 03 Jul 2009 05:37:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MMfCa-00047g-Ei for emacs-devel@gnu.org; Fri, 03 Jul 2009 05:37:05 -0400 Original-Received: from [199.232.76.173] (port=47534 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MMfCa-00047d-7W for emacs-devel@gnu.org; Fri, 03 Jul 2009 05:37:04 -0400 Original-Received: from mtaout3.012.net.il ([84.95.2.7]:15409) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MMfCW-0001IP-5G; Fri, 03 Jul 2009 05:37:00 -0400 Original-Received: from conversion-daemon.i_mtaout3.012.net.il by i_mtaout3.012.net.il (HyperSendmail v2004.12) id <0KM7004009D48N00@i_mtaout3.012.net.il>; Fri, 03 Jul 2009 12:36:58 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.127.194.175]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KM7007R99DLBDB0@i_mtaout3.012.net.il>; Fri, 03 Jul 2009 12:36:58 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 9.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:111946 Archived-At: > Date: Fri, 3 Jul 2009 03:13:12 +0200 > From: Lennart Borgman > Cc: "Eric M. Ludlam" , > Emacs-Devel devel > > (defun semantic-gcc-get-include-paths (lang) > (let* ((gcc-cmd (cond > ((string= lang "c") "gcc") > (t (error "Unknown lang: %s" lang)))) > (gcc-output (semantic-gcc-query gcc-cmd "-v" "-E" "-x" lang))) > )) > > However calling (semantic-gcc-get-include-paths "c") does not catch > the output I want to gcc-output. I get > > Result: "gcc.exe: warning: `-x c' after last input file has no effect\n This is because your forgot to append null-device to the arguments you pass to semantic-gcc-get-include-paths. So the command line ends with a "-x c", which, as GCC tells you, is quite pointless without a file name after it. > Yes, but what about the two different categories of include paths. How > should they be handled? Just use both? Yes, both. Btw, as Miles's output shows, there could be more than 2 directories in this list, and all of them should be looked in. AFAIR, the order of lookup should be the order in which GCC prints them, because that's what GCC does.