With --Wall, add IFDEPTH warning on deep if statements.

This commit is contained in:
Wilson Snyder
2010-12-26 09:31:09 -05:00
parent bb9ee46f40
commit 850de5913d
8 changed files with 119 additions and 11 deletions
+5
View File
@@ -705,6 +705,10 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char
else if ( !strncmp (sw, "-I", 2)) {
addIncDir (parseFileArg(optdir, string (sw+strlen("-I"))));
}
else if ( !strcmp (sw, "-if-depth") && (i+1)<argc ) {
shift;
m_ifDepth = atoi(argv[i]);
}
else if ( !strcmp (sw, "-inline-mult") && (i+1)<argc ) {
shift;
m_inlineMult = atoi(argv[i]);
@@ -1061,6 +1065,7 @@ V3Options::V3Options() {
m_underlineZero = false;
m_errorLimit = 50;
m_ifDepth = 0;
m_inlineMult = 2000;
m_outputSplit = 0;
m_outputSplitCFuncs = 0;