Skip to content
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

Split up options_manager::init #26833

Merged
merged 1 commit into from
Nov 25, 2018

Conversation

jbytheway
Copy link
Contributor

Summary

SUMMARY: None

Purpose of change

This thousand-line function is big enough that gcc 7 chokes on it and gives a nearly-warning message:

src/options.cpp:874:6: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without

The message causes Vim to open that file every time I compile it, which is a little annoying.

Describe the solution

Resolve by splitting it up into more manageable chunks.

No functional change; purely rearranging code.

Additional context

I suspect that such a large function might also cause some static analysis tools to run very slowly.

I see in the Travis CI output that gcc 8 chokes on a couple of different functions in a similar way, but I'll let gcc 8 users worry about those.

This thousand-line function is big enough that gcc 7 chokes on it and
gives a nearly-warning message:

src/options.cpp:874:6: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without

The message causes Vim to open that file every time I compile it, which
is a little annoying.

Resolve by splitting it up into more manageable chunks.

No functional change.
@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style labels Nov 24, 2018
@ZhilkinSerg ZhilkinSerg merged commit 38918e7 into CleverRaven:master Nov 25, 2018
@jbytheway jbytheway deleted the split_huge_function branch November 25, 2018 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants