From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14182 invoked by alias); 8 Nov 2012 16:56:25 -0000 Received: (qmail 14173 invoked by uid 22791); 8 Nov 2012 16:56:24 -0000 X-SWARE-Spam-Status: No, hits=-7.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 08 Nov 2012 16:56:15 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA8GuDxX031117 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 8 Nov 2012 11:56:13 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qA8GuCxA002000; Thu, 8 Nov 2012 11:56:12 -0500 Message-ID: <509BE42B.3070602@redhat.com> Date: Thu, 08 Nov 2012 16:56:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH] Always include defs.h first. References: <20121107201107.25258.47267.stgit@brno.lan> <509B2BCA.2050703@codesourcery.com> In-Reply-To: <509B2BCA.2050703@codesourcery.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00197.txt.bz2 On 11/08/2012 03:49 AM, Yao Qi wrote: >> diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c >> index 05a030a..fbc2479 100644 >> --- a/gdb/arm-tdep.c >> +++ b/gdb/arm-tdep.c >> @@ -18,9 +18,10 @@ >> You should have received a copy of the GNU General Public License >> along with this program. If not, see. */ >> >> +#include "defs.h" >> + >> #include /* XXX for isupper (). */ >> >> -#include "defs.h" >> #include "frame.h" >> #include "inferior.h" >> #include "gdbcmd.h" > > What is the include order of "defs.h" and system headers, such as and ? When I learnt C programming some years ago, it was said system headers are included first, and then your own headers. This rule doesn't apply here? defs.h includes config.h and config.h must always be included before system headers. This is probably "authoritatively" described somewhere in autoconf's docs, but I can't find it now. But see e.g., . -- Pedro Alves