Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an error for initialization within YY_INITIAL_VALUE() with C++
Fix: ruby#442 Before: ``` ❯ exe/lrama -d sample/calc.y -o calc.c && cc -Wall calc.c -o calc ❯ exe/lrama -d sample/calc.y -o calc.c && gcc -Wall calc.c -o calc ❯ exe/lrama -d sample/calc.y -o calc.c && c++ -Wall calc.c -o calc clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated] calc.c:1199:40: error: default initialization of an object of const type 'const YYSTYPE' without a user-provided default constructor YY_INITIAL_VALUE (static const YYSTYPE yyval_default;) ``` After: ``` ❯ exe/lrama -d sample/calc.y -o calc.c && cc -Wall calc.c -o calc ❯ exe/lrama -d sample/calc.y -o calc.c && gcc -Wall calc.c -o calc ❯ exe/lrama -d sample/calc.y -o calc.c && c++ -Wall calc.c -o calc clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated] ```
- Loading branch information