Adding missing header for assert(), not in ns std::.

Closes #13
This commit is contained in:
Stefano Sanfilippo 2014-12-05 01:23:12 +01:00
parent 1b3ecac847
commit 7d615b91a5

View File

@ -180,7 +180,7 @@ void Abort::emit(std::ostream &stream, int indent) {
} }
void Assert::emit(std::ostream &stream, int indent) { void Assert::emit(std::ostream &stream, int indent) {
stream << "std::assert("; stream << "assert(";
expression->emit(stream); expression->emit(stream);
stream << ")"; stream << ")";
} }
@ -224,6 +224,7 @@ void Main::emit(std::ostream &stream, int indent) {
void Program::emit(std::ostream &stream, int indent) { void Program::emit(std::ostream &stream, int indent) {
stream << "#include <iostream>\n"; stream << "#include <iostream>\n";
stream << "#include <cassert>\n";
stream << "#include <cstdlib>\n\n"; stream << "#include <cstdlib>\n\n";
for (Function *f: functions) { for (Function *f: functions) {