build/msvc: Workaround for compiler optimization bug

This commit is contained in:
b-r-o-c-k 2018-03-04 17:44:23 -06:00
parent d7ee323326
commit 353ca83f73
1 changed files with 8 additions and 0 deletions

View File

@ -2436,6 +2436,11 @@ static bool valid_filetype(char_u *val)
return true;
}
#ifdef _MSC_VER
// MSVC optimizations are disabled for this function because it
// incorrectly generates an empty string for SHM_ALL.
#pragma optimize("", off)
#endif
/*
* Handle string options that need some action to perform when changed.
* Returns NULL for success, or an error message for an error.
@ -3305,6 +3310,9 @@ did_set_string_option (
return errmsg;
}
#ifdef _MSC_VER
#pragma optimize("", on)
#endif
/*
* Simple int comparison function for use with qsort()