On Thu, Oct 31, 2013 at 10:21 PM, Karl Williamson <public@khwilliamson.com> wrote: >>> I don't think we should be recommending -Accflags=-Werror=conversion >>> until blead can be compiled using it, starting with Configure. Here's >>> the >>> output of make -k (after Configure) >> >> >> Sigh. I should've known the tiny test program I used that beautifully >> displayed the shortening problem didn't represent the real world. >> Even -Wconversion (without escalating the warning to an error) >> includes a huge pile of different, unrelated potential problems when >> thrown at the Perl sources. The closest we could come might be: >> >> -Accflags='-Wconversion -Wno-sign-conversion -Wno-shorten-64-to-32' >> >> which is kind of a mouthful and still generates so many warnings with >> existing code that it would be hard to see any new ones, even if >> people could develop the habit of reviewing and acting on warnings, >> which experience shows usually won't happen. >> >> So I agree with you, but I don't know what else to recommend. > > > Maybe there are real bugs here, so that we should look at. I've revised the build advice as folows: commit 50e4f4d46de7747365d201feabf76ce56822c514 Author: Craig A. Berry <craigberry@mac.com> Date: Sat Nov 2 13:51:42 2013 -0500 Revise fake bool build advice from f789f6a4bdb. The suggestions from that Craig Berry fellow were only half-baked. diff --git a/pod/perlhacktips.pod b/pod/perlhacktips.pod index 32739ff..74ec78b 100644 --- a/pod/perlhacktips.pod +++ b/pod/perlhacktips.pod @@ -1338,8 +1338,12 @@ be truncated. The C<cBOOL> macro exists to cast it correctly. On those platforms and compilers where C<bool> really is a boolean (C++, C99), it is easy to forget the cast. You can force C<bool> to be a C<char> by compiling with C<-Accflags=-DPERL_BOOL_AS_CHAR>. You may also wish to -add C<-Accflags=-Werror=conversion> or your compiler's equivalent to make -it impossible to ignore the unsafe truncations. +run C<Configure> with something like + + C<-Accflags='-Wconversion -Wno-sign-conversion -Wno-shorten-64-to-32'> + +or your compiler's equivalent to make it easier to spot any unsafe truncations +that show up. =head2 The .i TargetsThread Previous | Thread Next