From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathieu Lirzin Newsgroups: gmane.emacs.devel Subject: Re: Using " rather than < for header files in Emacs Date: Tue, 08 Mar 2016 16:51:10 +0100 Message-ID: <87lh5tdl3l.fsf@gnu.org> References: <56D772EC.5070509@cs.ucla.edu> <87egbpdqb4.fsf@gnu.org> <56DB19B5.7040906@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1457452293 9866 80.91.229.3 (8 Mar 2016 15:51:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Mar 2016 15:51:33 +0000 (UTC) Cc: Wilfred Hughes , emacs-devel To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 08 16:51:28 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1adJut-000374-PH for ged-emacs-devel@m.gmane.org; Tue, 08 Mar 2016 16:51:23 +0100 Original-Received: from localhost ([::1]:35453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adJut-0007SC-4b for ged-emacs-devel@m.gmane.org; Tue, 08 Mar 2016 10:51:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adJuo-0007O8-D6 for emacs-devel@gnu.org; Tue, 08 Mar 2016 10:51:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adJuk-0004uE-F2 for emacs-devel@gnu.org; Tue, 08 Mar 2016 10:51:18 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adJuk-0004uA-Av; Tue, 08 Mar 2016 10:51:14 -0500 Original-Received: from mek33-4-82-236-46-88.fbx.proxad.net ([82.236.46.88]:51290 helo=godel) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1adJuj-0003Rj-Is; Tue, 08 Mar 2016 10:51:13 -0500 In-Reply-To: <56DB19B5.7040906@cs.ucla.edu> (Paul Eggert's message of "Sat, 5 Mar 2016 09:39:01 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:201153 Archived-At: Paul Eggert writes: > Herring, Davis wrote: >> It is defined by C (don't know as of which version off hand) that #include"x" can find what #include finds (but may find something else first). > > Yes, a portable program can't assume that "..." will find files that > <...> won't. In some C compilers, "..." looks in the working directory > that the compiler is run in; in POSIX-compatible compilers (including > GCC) "..." will first look in the directory containing the source file > that has the "..."; in other C compilers (including Microsoft) "..." > will also search in the directories of currently opened include files; > and I assume there are other possibilities. > 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. > (There was a reason in GCC before 3.0 to prefer angle brackets or > double quotes, depending on whether you wanted -MM to generate > dependency information, but that reason is obsolescent now.) I didn't know about that. Thanks for sharing your knowledge. :) -- Mathieu Lirzin