[patch] implement generic debug() for vectors and hash sets

Aldy Hernandez aldyh@redhat.com
Mon Nov 27 15:18:00 GMT 2017



On 11/23/2017 02:12 PM, Gerald Pfeifer wrote:
> 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).

Sorry for dropping the ball on this over the US holidays.

This looks good to me, though I can't approve.

Thanks.

> 
> 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)					\
> 



More information about the Gcc-patches mailing list