From patchwork Mon Apr 14 14:52:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Palka X-Patchwork-Id: 338984 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id C917814008A for ; Tue, 15 Apr 2014 00:53:08 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; q=dns; s=default; b=xuTNZl2JHtfR tDgNeQLBOpHvw0nyz082zi8nzu97hohzorFy/gtZlz2OGmU5XrNj7zKroVkF299c dT1YUAeSdvAMqQYLSpc+s2N5f6Z0ntn+og/J2L9lt/JRpbU0F1CViAith2dK6npk uTkeKzIAlHHemQdbaIRlSMH/dlB77bk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; s=default; bh=HLf5MIGXveT1fNo0s3 OFUKg2Prs=; b=fs1Bk7T4YkpZ+PWM4IINpoVy5lMjnNqGvJxYONBM9macoa1I9r sk4L3+APiMl0BQRvX7vKX2RryDz8SWALNTAosvegYWQKxbAniKZKhHecxRbvgXH4 AIu5uKDcOGh8bag6AlNE/9qGA0O20Nz/yAKPJEDBFivuXUZKgrtKEN9MU= Received: (qmail 14697 invoked by alias); 14 Apr 2014 14:52:24 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 14639 invoked by uid 89); 14 Apr 2014 14:52:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-qc0-f176.google.com Received: from mail-qc0-f176.google.com (HELO mail-qc0-f176.google.com) (209.85.216.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 14 Apr 2014 14:52:22 +0000 Received: by mail-qc0-f176.google.com with SMTP id m20so8793684qcx.7 for ; Mon, 14 Apr 2014 07:52:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+nVf5/mMnzG62XOjiL8o1KrFva0w7KVEsgS7OBIRn/s=; b=kskwaHsmhOL8I//GUgLl7kDJxrxHNIDlj8SMYKsYqiejaryR2FA4J2Pw208RFXQA7c mh0jtMvN80uamRRXCtzKjJACoLbnh4SI7RmQVCkQ67ov2Y1Jd8yA1swCG+7LvIk608gi dLiZw/t4Xbj+ZnH9kDlb80hmDQZYZY/exaqg//B773KuBzEteW8wQ9fhBGXjqaB5S2Y4 vVWPPa5acHPdSjgmptlYi4CyQOY5Xp+kV/pZttFtW0rrr6E8E7XcL7oiQnAVntJV7XY0 YgvkVEXx04fcw6rtstvx41bBkJLZQw765uDVcFKbw4/gTI4W+vcwTp3FwVZloYb7S0IH +JEg== X-Gm-Message-State: ALoCoQmIPU/F5WlpCQVtGpzPy9/5WPqLPUXNg0GAU7UhaJBYQuqfEdACMwdnadVDnFIJUdp+/ND+ X-Received: by 10.229.12.197 with SMTP id y5mr3604056qcy.22.1397487140423; Mon, 14 Apr 2014 07:52:20 -0700 (PDT) Received: from localhost.localdomain (ool-4353a9c4.dyn.optonline.net. [67.83.169.196]) by mx.google.com with ESMTPSA id z2sm31735262qaj.10.2014.04.14.07.52.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Apr 2014 07:52:19 -0700 (PDT) From: Patrick Palka To: gcc-patches@gcc.gnu.org Cc: Patrick Palka Subject: [PATCH] [CLEANUP] Declare global functions before defining them Date: Mon, 14 Apr 2014 10:52:14 -0400 Message-Id: <1397487134-30090-1-git-send-email-patrick@parcs.ath.cx> Hi everyone, Many source files currently define a global function that is not previously declared within that source file because the source file did not include the appropriate header file that declares said function. This patch fixes a number of these occurrences by making sure to include the appropriate header file within the offending source files. Bootstrapped and regtested on x86_64-unknown-linux-gnu. 2014-04-11 Patrick Palka gcc/ * builtins.c: Include targhooks.h. * calls.c: Include calls.h. * cfgexpand.c: Include cfgexpand.h. * cfgloop.c: Include tree-ssa-loop-niter.h. * gimple-builder.c: Include gimple-builder.h. * input.c: Include diagnostic.h. * print-tree.c: Include print-tree.h. * stringpool.c: Include stringpool.h. * tree-cfgcleanup.c: Include tree-cfgcleanup.h. * tree-nested.c: Include tree-nested.h. libiberty/ * setproctitle.c: Include libiberty.h. * stack-limit.c: Likewise. --- gcc/builtins.c | 1 + gcc/calls.c | 1 + gcc/cfgexpand.c | 1 + gcc/cfgloop.c | 1 + gcc/gimple-builder.c | 1 + gcc/input.c | 1 + gcc/print-tree.c | 1 + gcc/stmt.c | 1 + gcc/stringpool.c | 1 + gcc/tree-cfgcleanup.c | 1 + gcc/tree-nested.c | 1 + libiberty/setproctitle.c | 1 + libiberty/stack-limit.c | 1 + 13 files changed, 13 insertions(+) diff --git a/gcc/builtins.c b/gcc/builtins.c index dd57b1a..e057554 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -59,6 +59,7 @@ along with GCC; see the file COPYING3. If not see #include "builtins.h" #include "ubsan.h" #include "cilk.h" +#include "targhooks.h" static tree do_mpc_arg1 (tree, tree, int (*)(mpc_ptr, mpc_srcptr, mpc_rnd_t)); diff --git a/gcc/calls.c b/gcc/calls.c index f0c92dd..ecb5c00 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -49,6 +49,7 @@ along with GCC; see the file COPYING3. If not see #include "cgraph.h" #include "except.h" #include "dbgcnt.h" +#include "calls.h" /* Like PREFERRED_STACK_BOUNDARY but in units of bytes, not bits. */ #define STACK_BYTES (PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT) diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index b7f6360..0c5fafb 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -73,6 +73,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-ssa-address.h" #include "recog.h" #include "output.h" +#include "cfgexpand.h" /* Some systems use __main in a way incompatible with its use in gcc, in these cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c index 70744d8..63e680f 100644 --- a/gcc/cfgloop.c +++ b/gcc/cfgloop.c @@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple-iterator.h" #include "gimple-ssa.h" #include "dumpfile.h" +#include "tree-ssa-loop-niter.h" static void flow_loops_cfg_dump (FILE *); diff --git a/gcc/gimple-builder.c b/gcc/gimple-builder.c index ba4be26..2f66f0e 100644 --- a/gcc/gimple-builder.c +++ b/gcc/gimple-builder.c @@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see #include "is-a.h" #include "gimple.h" #include "tree-ssanames.h" +#include "gimple-builder.h" /* Return the expression type to use based on the CODE and type of diff --git a/gcc/input.c b/gcc/input.c index 63cd062..3aacb32 100644 --- a/gcc/input.c +++ b/gcc/input.c @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see #include "intl.h" #include "input.h" #include "vec.h" +#include "diagnostic.h" /* This is a cache used by get_next_line to store the content of a file to be searched for file lines. */ diff --git a/gcc/print-tree.c b/gcc/print-tree.c index 91b696c..6b9f2bd 100644 --- a/gcc/print-tree.c +++ b/gcc/print-tree.c @@ -35,6 +35,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-cfg.h" #include "tree-dump.h" #include "dumpfile.h" +#include "print-tree.h" /* Define the hash table of nodes already seen. Such nodes are not repeated; brief cross-references are used. */ diff --git a/gcc/stmt.c b/gcc/stmt.c index 5d68edb..6bf5f06 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -59,6 +59,7 @@ along with GCC; see the file COPYING3. If not see #include "pretty-print.h" #include "params.h" #include "dumpfile.h" +#include "stmt.h" /* Functions and data structures for expanding case statements. */ diff --git a/gcc/stringpool.c b/gcc/stringpool.c index 4b6900c..e94d741 100644 --- a/gcc/stringpool.c +++ b/gcc/stringpool.c @@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "symtab.h" #include "cpplib.h" +#include "stringpool.h" /* The "" allocated string. */ const char empty_string[] = ""; diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c index b7882cf..1be73c6 100644 --- a/gcc/tree-cfgcleanup.c +++ b/gcc/tree-cfgcleanup.c @@ -52,6 +52,7 @@ along with GCC; see the file COPYING3. If not see #include "hashtab.h" #include "tree-ssa-propagate.h" #include "tree-scalar-evolution.h" +#include "tree-cfgcleanup.h" /* The set of blocks in that at least one of the following changes happened: -- the statement at the end of the block was changed diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c index df6923f..893f4d7 100644 --- a/gcc/tree-nested.c +++ b/gcc/tree-nested.c @@ -45,6 +45,7 @@ #include "expr.h" /* FIXME: For STACK_SAVEAREA_MODE and SAVE_NONLOCAL. */ #include "langhooks.h" #include "gimple-low.h" +#include "tree-nested.h" /* The object of this pass is to lower the representation of a set of nested diff --git a/libiberty/setproctitle.c b/libiberty/setproctitle.c index 6a2fe8c..288924b 100644 --- a/libiberty/setproctitle.c +++ b/libiberty/setproctitle.c @@ -25,6 +25,7 @@ Boston, MA 02110-1301, USA. */ #include #endif #include "ansidecl.h" +#include "libiberty.h" /* diff --git a/libiberty/stack-limit.c b/libiberty/stack-limit.c index 82c3d44..54ec7a8 100644 --- a/libiberty/stack-limit.c +++ b/libiberty/stack-limit.c @@ -35,6 +35,7 @@ Attempt to increase stack size limit to @var{pref} bytes if possible. #include "config.h" #include "ansidecl.h" +#include "libiberty.h" #ifdef HAVE_STDINT_H #include