This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] [CLEANUP] Mark locally-used functions static
- From: "Bernhard Reutner-Fischer" <rep dot dot dot nop at gmail dot com>
- To: Patrick Palka <patrick at parcs dot ath dot cx>, <gcc-patches at gcc dot gnu dot org>
- Cc: gfortran <fortran at gcc dot gnu dot org>
- Date: Mon, 14 Apr 2014 21:16:15 +0200
- Subject: Re: [PATCH] [CLEANUP] Mark locally-used functions static
- Authentication-results: sourceware.org; auth=none
- References: <1397486939-29936-1-git-send-email-patrick at parcs dot ath dot cx>
On 14 April 2014 16:50:51 Patrick Palka <patrick@parcs.ath.cx> wrote:
Hi everyone,
This patch marks "static" a bunch of locally-used, non-debug functions
within the GCC sources. Doing so addresses a subset of the warnings emitted
when compiling the GCC sources with -Wmissing-declarations.
I bootstrapped and regtested this change on x86_64-unknown-linux-gnu.
2014-04-13 Patrick Palka <patrick@parcs.ath.cx>
gcc/fortran/
* class.c (gfc_intrinsic_hash_value): Make static.
* trans-expr.c (gfc_conv_intrinsic_to_class): Likewise.
Please CC Fortran@ for Fortran FE patches.
Functions in the Fortran FE should lose their gfc_ prefix upon being made
static.
Thanks,
diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c
index 346aee6..75a3fe6 100644
--- a/gcc/fortran/class.c
+++ b/gcc/fortran/class.c
@@ -526,7 +526,7 @@ gfc_hash_value (gfc_symbol *sym)
/* Assign a hash value for an intrinsic type. The algorithm is that of
SDBM. */
-unsigned int
+static unsigned int
gfc_intrinsic_hash_value (gfc_typespec *ts)
{
unsigned int hash = 0;
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 30931a3..a7583cb 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -546,7 +546,7 @@ class_scalar_coarray_to_class (gfc_se *parmse, gfc_expr *e,
/* Takes an intrinsic type expression and returns the address of a temporary
class object of the 'declared' type. */
-void
+static void
gfc_conv_intrinsic_to_class (gfc_se *parmse, gfc_expr *e,
gfc_typespec class_ts)
{
Sent with AquaMail for Android
http://www.aqua-mail.com