This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gcc-in-cxx] Remove a couple of inline declarations
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 04 Mar 2009 08:26:46 -0800
- Subject: [gcc-in-cxx] Remove a couple of inline declarations
In C++ declaring a function as inline means that no definition of it is
emitted. It is therefore a bad idea to declare a function as inline in
one source file if it is called from another source file. I committed
this patch to the gcc-in-cxx branch to remove a couple of inline
declarations which are inappropriate for C++.
Ian
2009-03-04 Ian Lance Taylor <iant@google.com>
* bitmap.c (bitmap_clear): Don't declare as inline.
* tree-ssa-sccvn.c (vn_nary_op_compute_hash): Likewise.
Index: bitmap.c
===================================================================
--- bitmap.c (revision 144568)
+++ bitmap.c (working copy)
@@ -291,7 +291,7 @@ bitmap_elt_clear_from (bitmap head, bitm
/* Clear a bitmap by freeing the linked list. */
-inline void
+void
bitmap_clear (bitmap head)
{
if (head->first)
Index: tree-ssa-sccvn.c
===================================================================
--- tree-ssa-sccvn.c (revision 144568)
+++ tree-ssa-sccvn.c (working copy)
@@ -1139,7 +1139,7 @@ vn_reference_insert_pieces (VEC (tree, g
/* Compute and return the hash value for nary operation VBO1. */
-inline hashval_t
+hashval_t
vn_nary_op_compute_hash (const vn_nary_op_t vno1)
{
hashval_t hash = 0;