Archived
This forum has been archived. Please start a new discussion on GitHub.
Ice-3.6b: warning resulting in error when compiling with CPP11
Linux, clang 3.4.2-8
g++ -c -I.. -I../../include -DSLICE_API_EXPORTS -std=c++0x -m64 -fvisibility=hidden -Wall -Werror -pthread -fPIC -g ../Slice/Grammar.cpp
lex.yy.c:805:2: error: 'register' storage class specifier is deprecated [-Werror,-Wdeprecated-register]
register yy_state_type yy_current_state;
^~~~~~~~~
lex.yy.c:806:2: error: 'register' storage class specifier is deprecated [-Werror,-Wdeprecated-register]
register char *yy_cp, *yy_bp;
^~~~~~~~~
lex.yy.c:806:2: error: 'register' storage class specifier is deprecated [-Werror,-Wdeprecated-register]
register char *yy_cp, *yy_bp;
fixed with removing -Werror at Make.rules.Linux:82
CXXFLAGS += $(CXXARCHFLAGS) -fvisibility=hidden -Wall -Werror -pthread
g++ -c -I.. -I../../include -DSLICE_API_EXPORTS -std=c++0x -m64 -fvisibility=hidden -Wall -Werror -pthread -fPIC -g ../Slice/Grammar.cpp
lex.yy.c:805:2: error: 'register' storage class specifier is deprecated [-Werror,-Wdeprecated-register]
register yy_state_type yy_current_state;
^~~~~~~~~
lex.yy.c:806:2: error: 'register' storage class specifier is deprecated [-Werror,-Wdeprecated-register]
register char *yy_cp, *yy_bp;
^~~~~~~~~
lex.yy.c:806:2: error: 'register' storage class specifier is deprecated [-Werror,-Wdeprecated-register]
register char *yy_cp, *yy_bp;
fixed with removing -Werror at Make.rules.Linux:82
CXXFLAGS += $(CXXARCHFLAGS) -fvisibility=hidden -Wall -Werror -pthread
0
Comments
-
Hi Alex,
Thank you for this bug report. A more correct fix is actually to get rid of/ignore this warning in this generated code, not remove -Werror. See
https://github.com/zeroc-ice/ice/blob/master/cpp/src/Slice/Grammar.y
You could also build with head on master or v3.6.0-rc0 ... and submit a pull request with your fixes.
All the best,
Bernard0 -
Hi Alex,
This issue has been fixed.
Cheers,
Joe0