[Top][All Lists]

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

Re: Using " rather than < for header files in Emacs

From: Paul Eggert
Subject: Re: Using " rather than < for header files in Emacs
Date: Wed, 9 Mar 2016 00:19:41 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

Mathieu Lirzin wrote:
>In theory, the "..." form could lead to including the wrong file. In
>practice, the way Emacs does it is harmless, but why add risk by using
>"..." more often?
Could you give a concrete example of a possible include problem using
"..."?  It would help me understand the issue.

Well, as I said I doubt whether Emacs has the problem, but it could be something like this:

a/x.h: #include "y.h"
b/z.h: #include <x.h>
b/y.h: int foo;
c/y.h: char foo;
c/f.c: #include <z.h>

cd c; cc -I../a -I../b f.c

With GNU, 'foo' is of type 'int'. With Microsoft C, it sounds like 'foo' is of type 'char'. I don't use Microsoft C so this example is untested there and may not be quite right, but I hope it gives you the idea.

reply via email to

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