From: Steve Hay Date: Wed, 4 Jan 2006 10:39:13 +0000 (+0000) Subject: Workaround Win32 compiler bugs following change 26395 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=834268b87a8eb670d899a13106c8dfcdfc7c9b66;p=p5sagit%2Fp5-mst-13.2.git Workaround Win32 compiler bugs following change 26395 Can't understand what VC++ 6 and Borland don't like about it. There is similar code for SvMAGIC and SvSTASH already in sv.h. Must be compiler bugs since VC++ 7 and MinGW (and compilers on other platforms) are all happy. p4raw-id: //depot/perl@26634 --- diff --git a/gv.h b/gv.h index a97d4ba..97d3cd0 100644 --- a/gv.h +++ b/gv.h @@ -24,7 +24,11 @@ struct gp { #define GvXPVGV(gv) ((XPVGV*)SvANY(gv)) -#ifdef DEBUGGING +/* MSVC++ 6.0 (_MSC_VER == 1200) can't compile pp_hot.c with DEBUGGING enabled + * if we include the following assert(). Must be a compiler bug because it + * works fine with MSVC++ 7.0. Borland (5.5.1) has the same problem. */ +#if defined(DEBUGGING) && \ + ((!defined(_MSC_VER) || _MSC_VER > 1200) && !defined(__BORLANDC__)) # define GvGP(gv) (*(assert(SvTYPE(gv) == SVt_PVGV || \ SvTYPE(gv) == SVt_PVLV), \ &(GvXPVGV(gv)->xgv_gp)))