Skip to content
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

gcc with C++11 incompatibilities #45

Closed
nzeemin opened this issue Apr 25, 2020 · 1 comment
Closed

gcc with C++11 incompatibilities #45

nzeemin opened this issue Apr 25, 2020 · 1 comment

Comments

@nzeemin
Copy link

nzeemin commented Apr 25, 2020

Marty, many thanks for the LZSA code, I re-used it for my Sav2Cart utility here: https://github.com/nzeemin/ukncbtl-utils/tree/master/Sav2Cartridge

Just FYI, compiling the LZSA code under Ubuntu with gcc, in C++11 mode, I found two small incompatibilities, both are very easy to fix:
1.

lzsa/shrink_block_v2.c:444:28: error: ‘for’ loop initial declarations are only allowed in C99 mode
                            for (int nn = n;
                            ^
lzsa/shrink_block_v2.c:444:28: note: use option -std=c99 or -std=gnu99 to compile your code
lzsa/matchfinder.c:135:4: error: ‘for’ loop initial declarations are only allowed in C99 mode
    for (int r = 1; r < nInWindowSize; r++) {
    ^
lzsa/matchfinder.c:135:4: note: use option -std=c99 or -std=gnu99 to compile your code
@emmanuel-marty
Copy link
Owner

This should be fixed now, thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants