• Douglas Heriot's avatar
    Define GOOGLE_ATTRIBUTE_NOINLINE for MSVC. Workaround for VS2015 Release build compiler bug. · 5021c4d8
    Douglas Heriot authored
    See issue #240 - MSVC in VS2015 seems to inline a function it shouldn't. My original workaround was to disable inlining for the whole file, but I found a way to do it on just this specific function using __declspec(noinline).
    Unfortunately __declspec has to go at the start of the function declaration, while __attribute in GCC can go either before or after. I had to move lots of GOOGLE_ATTRIBUTE_NOLINE to make it compile. I have not yet tested this change with GCC.
    
    Will there be other side effects of defining this, given it wasn't previously?
    
    I also noticed a few functions marked with both the 'inline' keyword, and GOOGLE_ATTRIBUTE_NOINLINE - huh? Is there an explanation for this, or is it an oversight?
    5021c4d8
Name
Last commit
Last update
benchmarks Loading commit data...
cmake Loading commit data...
conformance Loading commit data...
csharp Loading commit data...
editors Loading commit data...
examples Loading commit data...
java Loading commit data...
javanano Loading commit data...
m4 Loading commit data...
more_tests Loading commit data...
objectivec Loading commit data...
protoc-artifacts Loading commit data...
python Loading commit data...
ruby Loading commit data...
src Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
BUILD Loading commit data...
CHANGES.txt Loading commit data...
CONTRIBUTORS.txt Loading commit data...
INSTALL.txt Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
Protobuf.podspec Loading commit data...
README.md Loading commit data...
WORKSPACE Loading commit data...
appveyor.bat Loading commit data...
appveyor.yml Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
generate_descriptor_proto.sh Loading commit data...
gmock.BUILD Loading commit data...
post_process_dist.sh Loading commit data...
protobuf-lite.pc.in Loading commit data...
protobuf.pc.in Loading commit data...
travis.sh Loading commit data...
update_file_lists.sh Loading commit data...