You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since moving to max-sdk-base (from the old max-sdk, prior to this separation) I've been getting these warnings about macros like:
CLASS_ATTR_SYM
in Xcode where the max object is a C++ object (I'm not using the min-api I have my own C++ wrapper). The warning does not occur for exactly the same code if I switch back to the old SDK, so it's related to the SDK, and not Xcode version/compiler etc. I cannot find any relevant pragmas that would have previously been suppressing the warning, nor do my types have any virtual methods.
Everything still works as expected, but it is a bit tedious - do you have any pointers for why this might have changed and if I can suppress the warnings?
The text was updated successfully, but these errors were encountered:
Yes, it does cause warnings for all the CLASS_ATTR macros (since they all use the calcoffset macro under the hood) which is harmless but very annoying...
It could be trivially solved by declaring:
But I don't know if the C74 folks will ever make this change, and I don't feel like spending the time to create a pull request that might be ignored. As you can clearly see C74 is not very responsive to this kind of SDK related bugs.
On a more general note the habit of using unsigned integers for sizes and quantities is absolutely wrong.
Unfortunately the C++ std library declares size_t as unsigned and therefore it's hard to escape the pitfall.
FWIW - I am currently using -Wno-invalid-offsetof in my configs which suppresses the warning. The warning is technically correct due to the very narrow definition of a POD type in the C++ standard, but in practice the types I am using are safe to use offsetof() on.
I'm not sure of the relevance of unsigned integers to this issue.
Since moving to max-sdk-base (from the old max-sdk, prior to this separation) I've been getting these warnings about macros like:
CLASS_ATTR_SYM
in Xcode where the max object is a C++ object (I'm not using the min-api I have my own C++ wrapper). The warning does not occur for exactly the same code if I switch back to the old SDK, so it's related to the SDK, and not Xcode version/compiler etc. I cannot find any relevant pragmas that would have previously been suppressing the warning, nor do my types have any virtual methods.
Everything still works as expected, but it is a bit tedious - do you have any pointers for why this might have changed and if I can suppress the warnings?
The text was updated successfully, but these errors were encountered: