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: CC Mode and GCC/CEDET integration for evaluating macros Date: Sat, 02 May 2015 11:27:22 +0300 Message-ID: <83y4l7peol.fsf@gnu.org> References: <87k2wsi62e.fsf@gmail.com> <20150501181135.GA6376@acm.fritz.box> <877fssi2cb.fsf@gmail.com> <83lhh8qgp6.fsf@gnu.org> <87zj5ogmf5.fsf@gmail.com> <83egn0qemn.fsf@gnu.org> <87r3r0gk4c.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1430556025 30013 80.91.229.3 (2 May 2015 08:40:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 May 2015 08:40:25 +0000 (UTC) Cc: acm@muc.de, emacs-devel@gnu.org To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 02 10:40:13 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YoSy1-00087i-Dj for ged-emacs-devel@m.gmane.org; Sat, 02 May 2015 10:40:09 +0200 Original-Received: from localhost ([::1]:56366 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoSy0-0005mX-Ry for ged-emacs-devel@m.gmane.org; Sat, 02 May 2015 04:40:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoSxH-0004oP-FF for emacs-devel@gnu.org; Sat, 02 May 2015 04:39:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YoSna-00064Z-PP for emacs-devel@gnu.org; Sat, 02 May 2015 04:29:25 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:50805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoSna-000648-HI for emacs-devel@gnu.org; Sat, 02 May 2015 04:29:22 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NNP00600R2PNW00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Sat, 02 May 2015 11:27:39 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NNP006FURI3O210@a-mtaout20.012.net.il>; Sat, 02 May 2015 11:27:39 +0300 (IDT) In-reply-to: <87r3r0gk4c.fsf@gmail.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:186123 Archived-At: > From: Oleh Krehel > Cc: acm@muc.de, emacs-devel@gnu.org > Date: Fri, 01 May 2015 21:42:27 +0200 > > Eli Zaretskii writes: > > >> From: Oleh Krehel > >> Cc: acm@muc.de, emacs-devel@gnu.org > >> Date: Fri, 01 May 2015 20:52:46 +0200 > >> > >> > You need to pass it the same -I flags as used during the Emacs build, > >> > see src/Makefile. > >> > >> Thanks for the suggestion. I tried it and it didn't work. > > > > Sorry, I'm confused: what did you try, and how did it not work? > > I did (setq c-macro-prompt-flag t), marked HAVE_PWD_H with a region, > called `c-macro-expand', entered that huge "-I" expression that I got from > make. Got this: > > c-macro-expansion: Search failed: " > ??? !!! ??? start of c-macro expansion ??? !!! ???" This generally means that cpp exited with some error, I think. (yes, the error message could be improved.) I suggest to step with a debugger through the relevant functions in cmacexp.el, it's possible there's a bug there. More to the point: I don't know what you mean, exactly, by "marked HAVE_PWD_H with a region". For a C preprocessor to produce something reasonable, the region you mark should be valid C, so you should at least include everything to and including the matching #endif in the region. If I do that, the command works for me, and produces a region with the contents of header, which means HAVE_PWD_H is defined in my configuration.