unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Oleh Krehel <ohwoeowho@gmail.com>
Cc: acm@muc.de, emacs-devel@gnu.org
Subject: Re: CC Mode and GCC/CEDET integration for evaluating macros
Date: Sat, 02 May 2015 11:27:22 +0300	[thread overview]
Message-ID: <83y4l7peol.fsf@gnu.org> (raw)
In-Reply-To: <87r3r0gk4c.fsf@gmail.com>

> From: Oleh Krehel <ohwoeowho@gmail.com>
> Cc: acm@muc.de,  emacs-devel@gnu.org
> Date: Fri, 01 May 2015 21:42:27 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Oleh Krehel <ohwoeowho@gmail.com>
> >> 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 <pwd.h> header, which means HAVE_PWD_H is defined
in my configuration.



  reply	other threads:[~2015-05-02  8:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-01 17:03 CC Mode and GCC/CEDET integration for evaluating macros Oleh Krehel
2015-05-01 18:11 ` Alan Mackenzie
2015-05-01 18:23   ` Oleh Krehel
2015-05-01 18:46     ` Eli Zaretskii
2015-05-01 18:52       ` Oleh Krehel
2015-05-01 19:30         ` Eli Zaretskii
2015-05-01 19:42           ` Oleh Krehel
2015-05-02  8:27             ` Eli Zaretskii [this message]
2015-05-02  9:07               ` Eli Zaretskii
2015-05-02  8:57   ` martin rudalics
2015-05-02 12:00     ` Oleh Krehel
2015-05-03 16:45       ` martin rudalics

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83y4l7peol.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=ohwoeowho@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).