Skip to content

register keyword removed from C++17 #23

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

Closed
tonycoz opened this issue May 22, 2023 · 1 comment
Closed

register keyword removed from C++17 #23

tonycoz opened this issue May 22, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@tonycoz
Copy link

tonycoz commented May 22, 2023

(Same as pmqs/Compress-Raw-Bzip2#11 )

As you know we build blead perl using C++, but some modern C++ compilers that default to C++17 report an error for the register keyword:

 c++ -DNO_MATHOMS -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Werror=pointer-arith -Werror=vla -Wextra -Wno-long-long -Wno-declaration-after-statement -Wc++-compat -Wwrite-strings -O2   -DVERSION=\"2.204\" -DXS_VERSION=\"2.204\" -fPIC "-I../.."  -DBZ_NO_STDIO  compress.c
compress.c:190:13: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
            register UChar  rtmp;
            ^~~~~~~~~

This can be fixed by simply removing "register" and if you like I can supply a PR doing that, but that will also increase the distance between your zlib source and the upstream zlib source, you might prefer to add:

#define register

at the top of deflate.c and trees.c instead.

@pmqs pmqs self-assigned this May 22, 2023
pmqs added a commit that referenced this issue May 22, 2023
register keyword not allowed in C++17
#23
@pmqs
Copy link
Owner

pmqs commented May 22, 2023

fix applied, thanks!

@pmqs pmqs added the bug Something isn't working label Jul 13, 2023
@pmqs pmqs closed this as completed Jul 13, 2023
jkeenan added a commit to Perl/perl5 that referenced this issue Jul 19, 2023
  2.205 16 July 2023

      * 2.205
        Sun, 16 Jul 2023 16:11:31 +0100
        3effdb9dbaa9bedfff3cad44902e515409ffae78

      * Test::More::isn't warns in perl 5.38
        Sun, 9 Jul 2023 21:38:15 +0100
        928bbc6ddc5178621fb477b38a1b4b4de38866cf

      * add zlib-ng 2.1.3
        Thu, 29 Jun 2023 19:51:58 +0100
        b1aa2583b4c114c2194890a0e015fdc439928c31

      * add zlib-ng 2.1.2
        Fri, 9 Jun 2023 14:51:17 +0100
        0d505d9156ca7e9cac15e2d6e574099300f91a14

      * Change storage of ZLIBNG_VER_STATUS from IV to PV pmqs/Compress-Raw-Zlib#24
        Fri, 9 Jun 2023 14:30:36 +0100
        0a8fb7141a43b8e49609fb06f05fad5150a97c2a

      * Fix to allow building with C++17 register keyword not allowed in C++17 pmqs/Compress-Raw-Zlib#23
        Mon, 22 May 2023 12:42:51 +0100
        a7c12acdd4ce7fdc070f50ac78e68e04c8699c81

      * Change while loop for `LimitOutput`  example pmqs/Compress-Raw-Zlib#21
        Sun, 21 May 2023 21:32:19 +0100
        972f03b5b0bf06d44991bbee2d2c9216e4175154

      * [doc] zlib.h: Remove duplicate "the" (#22)
        Mon, 1 May 2023 22:46:39 +0200
        89b43e6978d8e9b16801f48881cadf822585be0d

      * Add zlib compat version for 2.0.7
        Sat, 18 Mar 2023 08:42:59 +0000
        e7d79cbd5924fbdcd3515fb3b0ad171c7720105c
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Aug 1, 2023
Changelog:
===========
* drop rt.cpan from SUPPORT section
* Test::More::isn't warns in perl 5.38
* add zlib-ng 2.1.3
* add zlib-ng 2.1.2
* Change storage of ZLIBNG_VER_STATUS from IV to PV pmqs/Compress-Raw-Zlib#24
* Fix to allow building with C++17 register keyword not allowed in C++17 pmqs/Compress-Raw-Zlib#23
* Change while loop for `LimitOutput`  example pmqs/Compress-Raw-Zlib#21
* [doc] zlib.h: Remove duplicate "the" (openembedded#22)
* Add zlib compat version for 2.0.7

Signed-off-by: Wang Mingyu <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
daregit pushed a commit to daregit/yocto-combined that referenced this issue May 22, 2024
Changelog:
===========
* drop rt.cpan from SUPPORT section
* Test::More::isn't warns in perl 5.38
* add zlib-ng 2.1.3
* add zlib-ng 2.1.2
* Change storage of ZLIBNG_VER_STATUS from IV to PV pmqs/Compress-Raw-Zlib#24
* Fix to allow building with C++17 register keyword not allowed in C++17 pmqs/Compress-Raw-Zlib#23
* Change while loop for `LimitOutput`  example pmqs/Compress-Raw-Zlib#21
* [doc] zlib.h: Remove duplicate "the" (#22)
* Add zlib compat version for 2.0.7

Signed-off-by: Wang Mingyu <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants