mirror of
https://github.com/verilator/verilator.git
synced 2025-01-10 00:27:35 +00:00
Respect clang's default -fbracket-depth by default
Set default value of --comp-limit-parens to 240, to respect default maximum nesting of parentheses in clang (which is controlled by -fbracket-depth and defaults to 256). For code generation consistency, also use the same default with gcc.
This commit is contained in:
parent
290c2e0388
commit
ac4ec87942
@ -1010,11 +1010,11 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char
|
||||
if (!strcmp(valp, "clang")) {
|
||||
m_compLimitBlocks = 80; // limit unknown
|
||||
m_compLimitMembers = 64; // soft limit, has slowdown bug as of clang++ 3.8
|
||||
m_compLimitParens = 80; // limit unknown
|
||||
m_compLimitParens = 240; // controlled by -fbracket-depth, which defaults to 256
|
||||
} else if (!strcmp(valp, "gcc")) {
|
||||
m_compLimitBlocks = 0; // Bug free
|
||||
m_compLimitMembers = 64; // soft limit, has slowdown bug as of g++ 7.1
|
||||
m_compLimitParens = 0; // Bug free
|
||||
m_compLimitParens = 240; // Unlimited, but generate same code as for clang
|
||||
} else if (!strcmp(valp, "msvc")) {
|
||||
m_compLimitBlocks = 80; // 128, but allow some room
|
||||
m_compLimitMembers = 0; // probably ok, and AFAIK doesn't support anon structs
|
||||
|
@ -316,7 +316,7 @@ private:
|
||||
|
||||
int m_compLimitBlocks = 0; // compiler selection; number of nested blocks
|
||||
int m_compLimitMembers = 64; // compiler selection; number of members in struct before make anon array
|
||||
int m_compLimitParens = 0; // compiler selection; number of nested parens
|
||||
int m_compLimitParens = 240; // compiler selection; number of nested parens
|
||||
|
||||
string m_bin; // main switch: --bin {binary}
|
||||
string m_exeName; // main switch: -o {name}
|
||||
|
Loading…
Reference in New Issue
Block a user