Juce packing protection possibly compromised


#1

It seems that in the conversion to modules, the scope of the #pragma pack (push, 8 ) was reduced:

juce_core.h

#if JUCE_MSVC
 #pragma warning (disable: 4251) // (DLL build warning, must be disabled before pushing the warning state)
 #pragma pack (push, 8) // this is set explicitly in case the app is using a different packing size.

This only protects the includes for the core module. The other modules are left out in the cold - was this the intention?


#2

Hmm… Thanks Vinnie, I think that might have slipped under my radar.

But… I think that code dates back to when the library was always linked as a static lib, to make sure that the headers matched the packing size that had been used to build the lib. Now, that’s generally not important, and there’s no reason to enforce a fixed packing size on the code unless someone is building their own lib, and in that case they can set it themselves before including the juce headers. So in fact, I think I’ll probably just remove the pragma altogether.