- because uiuc_warning_error always called exit(-1), it can be marked
no return, so Clang realises that when it’s used in the ‘else’
side of a parsing test, uninitialised variables in the enclosing
call site are safe.
(Requires Simgear update to define SG_NO_RETURN helper)
exit(-1);
break;
}
+
+ cerr << "UIUC UNKNOWN ERROR" << endl;
+ exit(-1);
}
// end uiuc_warnings_errors.cpp
#include <string>
#include <cstdlib>
-void uiuc_warnings_errors(int errorCode, std::string line);
+SG_NO_RETURN void uiuc_warnings_errors(int errorCode, std::string line);
#endif //_WARNINGS_ERRORS_H_