From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Using " rather than < for header files in Emacs Date: Sat, 5 Mar 2016 09:39:01 -0800 Organization: UCLA Computer Science Department Message-ID: <56DB19B5.7040906@cs.ucla.edu> References: <56D772EC.5070509@cs.ucla.edu> <87egbpdqb4.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1457199560 23228 80.91.229.3 (5 Mar 2016 17:39:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Mar 2016 17:39:20 +0000 (UTC) Cc: Wilfred Hughes , emacs-devel To: "Herring, Davis" , Mathieu Lirzin Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 05 18:39:10 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 1acGAY-000702-D2 for ged-emacs-devel@m.gmane.org; Sat, 05 Mar 2016 18:39:10 +0100 Original-Received: from localhost ([::1]:47477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acGAX-0004RS-W2 for ged-emacs-devel@m.gmane.org; Sat, 05 Mar 2016 12:39:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acGAU-0004RA-JR for emacs-devel@gnu.org; Sat, 05 Mar 2016 12:39:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1acGAR-00042a-Dn for emacs-devel@gnu.org; Sat, 05 Mar 2016 12:39:06 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:35705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acGAR-00040i-7z; Sat, 05 Mar 2016 12:39:03 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5F949160FD0; Sat, 5 Mar 2016 09:39:02 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 9r3dUH_c_JEh; Sat, 5 Mar 2016 09:39:01 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 927D9161009; Sat, 5 Mar 2016 09:39:01 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id hEmvNQHKBpUh; Sat, 5 Mar 2016 09:39:01 -0800 (PST) Original-Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 66C1D160FD0; Sat, 5 Mar 2016 09:39:01 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 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:200960 Archived-At: 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? (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.)