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

fix(build): include stdexcept in state source #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Defmc
Copy link

@Defmc Defmc commented Dec 24, 2022

When compiling in Arch Linux with make install, G++ raises an error:

mkdir -p build
g++ -std=c++11 -c -o build/gen_json.o bootstrap/src/gen_json.cpp
g++ -std=c++11 -c -o build/grammar.o grammar/src/grammar.cpp
g++ -std=c++11 -c -o build/nonterminal.o grammar/src/nonterminal.cpp
g++ -std=c++11 -c -o build/token.o grammar/src/token.cpp
g++ -std=c++11 -c -o build/production.o grammar/src/production.cpp
g++ -std=c++11 -c -o build/table.o table/src/table.cpp
g++ -std=c++11 -c -o build/lr_table.o table/src/lr_table.cpp
g++ -std=c++11 -c -o build/lalr_table.o table/src/lalr_table.cpp
g++ -std=c++11 -c -o build/item_set.o table/src/item_set.cpp
g++ -std=c++11 -c -o build/item.o table/src/item.cpp
g++ -std=c++11 -c -o build/state.o table/src/state.cpp
table/src/state.cpp: In member function ‘void asparserations::table::State::add_transition(const asparserations::grammar::Symbol*, const asparserations::table::State*)’:
table/src/state.cpp:25:18: error: ‘runtime_error’ is not a member of ‘std’
   25 |       throw std::runtime_error("Bad cast from const Symbol* to const Token*");
      |                  ^~~~~~~~~~~~~
table/src/state.cpp:31:18: error: ‘runtime_error’ is not a member of ‘std’
   31 |       throw std::runtime_error(
      |                  ^~~~~~~~~~~~~
make: *** [Makefile:94: build/state.o] Error 1

The same occurs with clang++.

When compiling in Arch Linux with `make install`, G++ raises an error:
```
mkdir -p build
g++ -std=c++11 -c -o build/gen_json.o bootstrap/src/gen_json.cpp
g++ -std=c++11 -c -o build/grammar.o grammar/src/grammar.cpp
g++ -std=c++11 -c -o build/nonterminal.o grammar/src/nonterminal.cpp
g++ -std=c++11 -c -o build/token.o grammar/src/token.cpp
g++ -std=c++11 -c -o build/production.o grammar/src/production.cpp
g++ -std=c++11 -c -o build/table.o table/src/table.cpp
g++ -std=c++11 -c -o build/lr_table.o table/src/lr_table.cpp
g++ -std=c++11 -c -o build/lalr_table.o table/src/lalr_table.cpp
g++ -std=c++11 -c -o build/item_set.o table/src/item_set.cpp
g++ -std=c++11 -c -o build/item.o table/src/item.cpp
g++ -std=c++11 -c -o build/state.o table/src/state.cpp
table/src/state.cpp: In member function ‘void asparserations::table::State::add_transition(const asparserations::grammar::Symbol*, const asparserations::table::State*)’:
table/src/state.cpp:25:18: error: ‘runtime_error’ is not a member of ‘std’
   25 |       throw std::runtime_error("Bad cast from const Symbol* to const Token*");
      |                  ^~~~~~~~~~~~~
table/src/state.cpp:31:18: error: ‘runtime_error’ is not a member of ‘std’
   31 |       throw std::runtime_error(
      |                  ^~~~~~~~~~~~~
make: *** [Makefile:94: build/state.o] Error 1
``` 
The same occurs with `clang++`.
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

Successfully merging this pull request may close these issues.

None yet

1 participant