[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CEDET calls cpp -E -dM -x c++ /dev/null
From: |
Eli Zaretskii |
Subject: |
Re: CEDET calls cpp -E -dM -x c++ /dev/null |
Date: |
Fri, 03 Jul 2009 12:36:57 +0300 |
> Date: Fri, 3 Jul 2009 03:13:12 +0200
> From: Lennart Borgman <address@hidden>
> Cc: "Eric M. Ludlam" <address@hidden>,
> Emacs-Devel devel <address@hidden>
>
> (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.
- Re: CEDET calls cpp -E -dM -x c++ /dev/null, (continued)
- Re: CEDET calls cpp -E -dM -x c++ /dev/null, Lennart Borgman, 2009/07/01
- Re: CEDET calls cpp -E -dM -x c++ /dev/null, Eli Zaretskii, 2009/07/01
- Re: CEDET calls cpp -E -dM -x c++ /dev/null, Eric M. Ludlam, 2009/07/01
- Re: CEDET calls cpp -E -dM -x c++ /dev/null, Lennart Borgman, 2009/07/02
- Re: CEDET calls cpp -E -dM -x c++ /dev/null, Eli Zaretskii, 2009/07/02
- Re: CEDET calls cpp -E -dM -x c++ /dev/null, Lennart Borgman, 2009/07/02
- Re: CEDET calls cpp -E -dM -x c++ /dev/null, Miles Bader, 2009/07/02
- Re: CEDET calls cpp -E -dM -x c++ /dev/null, Lennart Borgman, 2009/07/02
- Re: CEDET calls cpp -E -dM -x c++ /dev/null,
Eli Zaretskii <=
- Re: CEDET calls cpp -E -dM -x c++ /dev/null, Lennart Borgman, 2009/07/03
- Re: CEDET calls cpp -E -dM -x c++ /dev/null, Lennart Borgman, 2009/07/01