From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.bugs Subject: bug#21707: include-file cleanup for src directory Date: Tue, 20 Oct 2015 20:28:33 +0100 Message-ID: <86a8rd2vby.fsf@gmail.com> References: <56249650.5050804@cs.ucla.edu> <83vba3gw4p.fsf@gnu.org> <5625D71F.402@cs.ucla.edu> <83oaftfulj.fsf@gnu.org> <56268CFA.6040708@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1445369443 22131 80.91.229.3 (20 Oct 2015 19:30:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 Oct 2015 19:30:43 +0000 (UTC) To: 21707@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 20 21:30:31 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1Zocbw-0000rk-2h for geb-bug-gnu-emacs@m.gmane.org; Tue, 20 Oct 2015 21:30:16 +0200 Original-Received: from localhost ([::1]:47692 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zocbv-0006DJ-Fk for geb-bug-gnu-emacs@m.gmane.org; Tue, 20 Oct 2015 15:30:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zocbs-0006DD-8Y for bug-gnu-emacs@gnu.org; Tue, 20 Oct 2015 15:30:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zocbn-0008IV-91 for bug-gnu-emacs@gnu.org; Tue, 20 Oct 2015 15:30:12 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zocbn-0008IN-5U for bug-gnu-emacs@gnu.org; Tue, 20 Oct 2015 15:30:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zocbm-0004i6-At for bug-gnu-emacs@gnu.org; Tue, 20 Oct 2015 15:30:06 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <56249650.5050804@cs.ucla.edu> Resent-From: Andy Moreton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Oct 2015 19:30:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21707 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.144536938018051 (code B ref -1); Tue, 20 Oct 2015 19:30:05 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Oct 2015 19:29:40 +0000 Original-Received: from localhost ([127.0.0.1]:58424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZocbL-0004h5-Hi for submit@debbugs.gnu.org; Tue, 20 Oct 2015 15:29:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47592) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zocb0-0004g3-86 for submit@debbugs.gnu.org; Tue, 20 Oct 2015 15:29:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zocaz-00087G-3i for submit@debbugs.gnu.org; Tue, 20 Oct 2015 15:29:17 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:35972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zocaz-00087B-0h for submit@debbugs.gnu.org; Tue, 20 Oct 2015 15:29:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zocay-00067b-5C for bug-gnu-emacs@gnu.org; Tue, 20 Oct 2015 15:29:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zocat-00086u-5s for bug-gnu-emacs@gnu.org; Tue, 20 Oct 2015 15:29:16 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:34108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zocas-00086n-Uq for bug-gnu-emacs@gnu.org; Tue, 20 Oct 2015 15:29:11 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Zocaa-00083p-VX for bug-gnu-emacs@gnu.org; Tue, 20 Oct 2015 21:28:53 +0200 Original-Received: from 82-69-64-228.dsl.in-addr.zen.co.uk ([82.69.64.228]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 20 Oct 2015 21:28:52 +0200 Original-Received: from andrewjmoreton by 82-69-64-228.dsl.in-addr.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 20 Oct 2015 21:28:52 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 22 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 82-69-64-228.dsl.in-addr.zen.co.uk User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt) Cancel-Lock: sha1:d2eEk69wQbhwT/c6kqlRp36bC6c= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:107788 Archived-At: On Tue 20 Oct 2015, Paul Eggert wrote: > Eli Zaretskii wrote: >> Would it help if we avoid including any of our headers in any >> other of our headers, so that the headers included by a particular C >> file are visible by just looking at that single C file? > > That would run afoul of a more important design goal, which is that we should > be able to include headers in any order. And anyway, compiling a typical C > file ordinarily brings in oodles of system headers that the C file doesn't > explicitly ask for, so regardless of our style the only practical way to see > what headers a C file includes is to compile it and see what gcc -E outputs. > > Ideally a C source file should include all headers that define symbols the > source file directly uses, and no headers other than that. This should be true > for both .h and .c files. We're not there by a long shot, but that should be > the goal. ...and also include headers for anything exported by the C file to ensure that declarations and definitions are not incompatible. AndyM