This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Get rid of compiler warning.
authorKarl Williamson <public@khwilliamson.com>
Mon, 18 Oct 2010 04:32:07 +0000 (22:32 -0600)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 21 Oct 2010 12:55:49 +0000 (05:55 -0700)
This patch should remove a compiler warning that is currently only
showing up in one compiler.  It declares a debug-only variable to be
volatile, so should silence the warning that it is getting clobbered.
Since this variable is only used for debugging purposes, when DEBUGGING
is defined, performance should not be an issue.

regcomp.h

index dcb449f..9e1a4e3 100644 (file)
--- a/regcomp.h
+++ b/regcomp.h
@@ -787,7 +787,7 @@ re.pm, especially to the documentation.
 
 #ifdef DEBUGGING
 
 
 #ifdef DEBUGGING
 
-#define GET_RE_DEBUG_FLAGS_DECL IV re_debug_flags = 0; GET_RE_DEBUG_FLAGS;
+#define GET_RE_DEBUG_FLAGS_DECL VOL IV re_debug_flags = 0; GET_RE_DEBUG_FLAGS;
 
 #define RE_PV_COLOR_DECL(rpv,rlen,isuni,dsv,pv,l,m,c1,c2) \
     const char * const rpv =                          \
 
 #define RE_PV_COLOR_DECL(rpv,rlen,isuni,dsv,pv,l,m,c1,c2) \
     const char * const rpv =                          \