diff --git a/CppEmitter.cpp b/CppEmitter.cpp index 24de662..f98cc19 100644 --- a/CppEmitter.cpp +++ b/CppEmitter.cpp @@ -321,7 +321,11 @@ bool CppEmitter::emit(Module const& module) { } bool CppEmitter::emit(FunctionPrototype const& proto) { - stream << proto.getType() << ' '; + if (proto.getName().getValue() == "main") { + stream << "int "; + } else { + stream << proto.getType() << ' '; + } GUARDED(proto.getName().emit(this)); stream << "("; emitFunctionParams(proto.getArgs());