New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handy.h:1922 shift-count-overflow warning under GCC 5.2, seems impossible #14898
Comments
From @dcollinsnGreetings, handy.h:1922 defines the following macro used to determine whether or not we need to check for an overflow condition at run-time: /* This expression will be constant-folded at compile time. It checks # define _MEM_WRAP_NEEDS_RUNTIME_CHECK(n,t) \ regcomp.c at 8731, 8734, 8970, and 8973 calls macro Copy(*, *, copy_count, UV), which expands to, in part: _MEM_WRAP_NEEDS_RUNTIME_CHECK(copy_count,UV) This causes the following compiler warning in GCC 5.2 when building with -Duse64bitint on x86: In file included from regcomp.c:75:0: It is difficult to imagine any universe in which "left shift count >= width of type" here: ((MEM_SIZE)1) << 8*(sizeof(MEM_SIZE) - sizeof(n))) As the left shift count is equal to the width of MEM_SIZE minus the width of copy_count, so unless sizeof(copy_count) == 0, this warning seems outright false. Hopefully someone else can get to the bottom of this and decide whether it's an upstream or not. |
From @dcollinsnThis same warning appears in pp_hot.c:3581: In file included from pp_hot.c:36:0: Several times in sv.c...: sv.c: In function ‘Perl_sv_vcatpvfn_flags’: At pp.c:2496: In file included from pp.c:28:0: At scope.c:79: In file included from scope.c:27:0: In perlio.c: In file included from perlio.c:43:0: And that's it. |
From @iabynOn Thu, Sep 10, 2015 at 07:34:30PM -0700, Dan Collins wrote:
The good news is that I have already fixed this in an in-progress private -- |
The RT System itself - Status changed from 'new' to 'open' |
From @khwilliamsonOn Mon Sep 14 03:53:14 2015, davem wrote:
I believe that this ticket can be closed |
From @xsawyerxOn Sat Aug 06 14:33:04 2016, khw wrote:
I agree. |
@xsawyerx - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#126038 (status was 'resolved')
Searchable as RT126038$
The text was updated successfully, but these errors were encountered: