Skip to content

Commit

Permalink
Merge pull request #148 from jryans/globals-static
Browse files Browse the repository at this point in the history
Add option to remove static from globals
  • Loading branch information
eeide committed Jan 25, 2023
2 parents deddca6 + abbfdfe commit 92069e4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/RandomProgramGenerator.cpp
Expand Up @@ -334,6 +334,7 @@ static void print_advanced_help()

cout << " --mark-mutable-const: mark constants that can be mutated with parentheses (disabled by default)." << endl << endl;

cout << " --force-globals-static | --no-force-globals-static: force functions and global variables to use static storage (enabled by default)." << endl << endl;
cout << " --force-non-uniform-arrays | --no-force-non-uniform-arrays: force integer arrays to be initialized with multiple values (enabled by default)." << endl << endl;

cout << " --null-ptr-deref-prob <N>: allow null pointers to be dereferenced with probability N% (0 by default)." << endl << endl;
Expand Down Expand Up @@ -1246,6 +1247,11 @@ main(int argc, char **argv)
continue;
}

if (strcmp (argv[i], "--no-force-globals-static") == 0) {
CGOptions::force_globals_static(false);
continue;
}

if (strcmp (argv[i], "--force-non-uniform-arrays") == 0) {
CGOptions::force_non_uniform_array_init(true);
continue;
Expand Down

0 comments on commit 92069e4

Please sign in to comment.