summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.solaris13
-rw-r--r--handy.h2
2 files changed, 1 insertions, 14 deletions
diff --git a/README.solaris b/README.solaris
index d3b541f8f1..427e08de6e 100644
--- a/README.solaris
+++ b/README.solaris
@@ -508,19 +508,6 @@ make sure that it includes the directory with the 'ar' command. This
is a common problem on Solaris, where 'ar' is in the /usr/ccs/bin/
directory.
-=item warning: dead part of constant expression is nonconstant
-
-If you are using the Sun Studio 10 compilers ('cc -V' reports "Sun C 5.7") you
-may see lots of these errors while building perl. This is an erroneous warning
-from the compiler, if you are interested in the details the Sun bug id is
-6344975. The warnings can safely be ignored, but if they bother you they may
-be suppressed by adding "-Accflags=-erroff=E_DEAD_NONCONST" to your Configure
-command-line. Note however that earlier versions of the compiler don't have the
-ability to report this warning and will complain about a bad message tag if you
-specify that you want the compiler to suppress the warning. Note also that the
-erroff option embedded into Config.pm and will be used for building any XSUB
-modules post-install.
-
=back
=head1 MAKE TEST
diff --git a/handy.h b/handy.h
index ada3124695..3f13a93853 100644
--- a/handy.h
+++ b/handy.h
@@ -636,7 +636,7 @@ hopefully catches attempts to access uninitialized memory.
#ifdef PERL_MALLOC_WRAP
#define MEM_WRAP_CHECK(n,t) MEM_WRAP_CHECK_1(n,t,PL_memory_wrap)
#define MEM_WRAP_CHECK_1(n,t,a) \
- (void)((sizeof(t)>1?(n):1)>((MEM_SIZE)~0)/sizeof(t)?(Perl_croak_nocontext(a),0):0)
+ (void)(sizeof(t) > 1 && (n) > ((MEM_SIZE)~0)/sizeof(t) && (Perl_croak_nocontext(a),0))
#define MEM_WRAP_CHECK_(n,t) MEM_WRAP_CHECK(n,t),
#define PERL_STRLEN_ROUNDUP(n) ((void)(((n) > (MEM_SIZE)~0 - 2 * PERL_STRLEN_ROUNDUP_QUANTUM) ? (Perl_croak_nocontext(PL_memory_wrap),0):0),((n-1+PERL_STRLEN_ROUNDUP_QUANTUM)&~((MEM_SIZE)PERL_STRLEN_ROUNDUP_QUANTUM-1)))