This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] implement generic debug() for vectors and hash sets
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: Jeff Law <law at redhat dot com>, Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 23 Nov 2017 20:12:52 +0100 (CET)
- Subject: Re: [patch] implement generic debug() for vectors and hash sets
- Authentication-results: sourceware.org; auth=none
- References: <CAGm3qMWSp34AbxpXXO+RdcS0zy+q-KcNMCdoU7pW+tqGvcDGXg@mail.gmail.com> <f6b5ec65-2f51-c66d-acc1-af182e3ca2fb@redhat.com> <fbbe0ae9-8095-12c9-f615-3b302ac74570@redhat.com> <CAGm3qMXG-qMcHaE=X1DbKKj-9WMm_v4bSG9fv1cVz615zWtAow@mail.gmail.com> <alpine.LSU.2.21.1711211155500.4428@anthias.pfeifer.com>
On Tue, 21 Nov 2017, Gerald Pfeifer wrote:
> /scratch/tmp/gerald/GCC-HEAD/gcc/print-rtl.c:982:1: error: explicit instantiation cannot have a storage class
> DEFINE_DEBUG_VEC (rtx_def *)
> ^
> /scratch/tmp/gerald/GCC-HEAD/gcc/vec.h:456:24: note: expanded from macro 'DEFINE_DEBUG_VEC'
> template static void debug_helper (vec<T> &); \
> ^
>
> The first failing boostrap seems to have been yesterday at 16:40 UTC,
> 24 hours before it still worked.
This fixes it for me; bootstrapped&tested on i586-unknown-freebsd10.4
(and compared with the last successbuild on the 19th).
Okay?
Gerald
2017-11-23 Gerald Pfeifer <gerald@pfeifer.com>
* hash-set.h (DEFINE_DEBUG_HASH_SET): Remove static qualifier
from explicit instantiation of debug_helper.
* vec.h (DEFINE_DEBUG_VEC): Ditto.
Index: hash-set.h
===================================================================
--- hash-set.h (revision 255092)
+++ hash-set.h (working copy)
@@ -150,7 +150,7 @@
}
#define DEFINE_DEBUG_HASH_SET(T) \
- template static void debug_helper (hash_set<T> &); \
+ template void debug_helper (hash_set<T> &); \
DEBUG_FUNCTION void \
debug (hash_set<T> &ref) \
{ \
Index: vec.h
===================================================================
--- vec.h (revision 255092)
+++ vec.h (working copy)
@@ -453,8 +453,8 @@
functions for a type T. */
#define DEFINE_DEBUG_VEC(T) \
- template static void debug_helper (vec<T> &); \
- template static void debug_helper (vec<T, va_gc> &); \
+ template void debug_helper (vec<T> &); \
+ template void debug_helper (vec<T, va_gc> &); \
/* Define the vec<T> debug functions. */ \
DEBUG_FUNCTION void \
debug (vec<T> &ref) \