-
Notifications
You must be signed in to change notification settings - Fork 273
Rename _start to __CPROVER_start #721
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
Conversation
a8c3e0b
to
9845351
Compare
@@ -71,7 +71,7 @@ bool contains(const std::string &haystack, const std::string &needle) | |||
|
|||
bool handle_start(std::string &source, const std::string &line) | |||
{ | |||
if ("void _start(void)" != line) return false; | |||
if ("void __CPROVER_start(void)" != line) return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -26,7 +26,7 @@ jsa_source_providert::jsa_source_providert(jsa_symex_learnt &lcfg) : | |||
{ | |||
} | |||
|
|||
#define START_METHOD_PREFIX "void _start" | |||
#define START_METHOD_PREFIX "void __CPROVER_start" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to put this into util/prefix.h to really have it in a single place?
-#define START_METHOD_PREFIX "void _start"
+#define START_METHOD_PREFIX "void __CPROVER_start"
Does it make sense to put this into util/prefix.h to really have it in a single place?
Perhaps as part of a general clean up of working out which variables,
functions, locations, etc. are internal?
|
5a4764d
to
139f4cb
Compare
There now really is just one point where the name is generated, which is also used from cegis. |
The previous regression test may fail dependent on the platform.
While identifiers starting with _ are reserved according to the C standard, people nevertheless use them. Using __CPROVER_start will make collisions less likely. Includes cleanup such that there is exactly one point where this name is spelled out.
139f4cb
to
9c68c07
Compare
Just observing that we have 5 instances of "__CPROVER_initialize" and 3 instances of CPROVER_PREFIX "initialize" in the code. I'd prefer the latter... |
I've created #735 to track cleanup of other uses of |
While identifiers starting with _ (or __ ?) are reserved according to the C standard,
people nevertheless use them. Using __CPROVER_start will make collisions less
likely.
Includes cleanup so that, outside cegis, there is exactly one point where this
name is spelled out.