emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CC Mode and GCC/CEDET integration for evaluating macros


From: Eli Zaretskii
Subject: Re: CC Mode and GCC/CEDET integration for evaluating macros
Date: Sat, 02 May 2015 11:27:22 +0300

> From: Oleh Krehel <address@hidden>
> Cc: address@hidden,  address@hidden
> Date: Fri, 01 May 2015 21:42:27 +0200
> 
> Eli Zaretskii <address@hidden> writes:
> 
> >> From: Oleh Krehel <address@hidden>
> >> Cc: address@hidden,  address@hidden
> >> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]