unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: eric@siege-engine.com, emacs-devel@gnu.org, miles@gnu.org
Subject: Re: CEDET calls cpp -E -dM -x c++ /dev/null
Date: Fri, 03 Jul 2009 12:36:57 +0300	[thread overview]
Message-ID: <83my7m2jly.fsf@gnu.org> (raw)
In-Reply-To: <e01d8a50907021813n3c87f7c0ld9151823988c9b1@mail.gmail.com>

> Date: Fri, 3 Jul 2009 03:13:12 +0200
> From: Lennart Borgman <lennart.borgman@gmail.com>
> Cc: "Eric M. Ludlam" <eric@siege-engine.com>,
> 	Emacs-Devel devel <emacs-devel@gnu.org>
> 
> (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.




  reply	other threads:[~2009-07-03  9:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-01 19:06 CEDET calls cpp -E -dM -x c++ /dev/null Lennart Borgman
2009-07-01 19:20 ` Eli Zaretskii
2009-07-01 19:25   ` Lennart Borgman
2009-07-01 19:36     ` Eli Zaretskii
2009-07-01 20:01       ` Sean O'Rourke
2009-07-01 20:16         ` Lennart Borgman
2009-07-01 20:32           ` Sean O'Rourke
2009-07-01 20:25       ` Lennart Borgman
2009-07-02  3:24         ` Eli Zaretskii
2009-07-02  3:34           ` Eric M. Ludlam
2009-07-02 18:13             ` Lennart Borgman
2009-07-02 19:29               ` Eli Zaretskii
2009-07-03  0:31                 ` Lennart Borgman
2009-07-03  0:46                   ` Miles Bader
2009-07-03  1:13                     ` Lennart Borgman
2009-07-03  9:36                       ` Eli Zaretskii [this message]
2009-07-03 11:22                         ` Lennart Borgman
2009-07-01 19:58     ` Lennart Borgman

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=83my7m2jly.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=eric@siege-engine.com \
    --cc=lennart.borgman@gmail.com \
    --cc=miles@gnu.org \
    /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).