When cross compiling JUCE library code with a GCC 8 for ARM I get a lot of warnings like that:
note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<juce::NetworkServiceDiscovery::Service*, std::vector<juce::NetworkServiceDiscovery::Service> >’ changed in GCC 7.1 std::sort (services.begin(), services.end(), compareServices);
A stackoverflow post says that this can lead to problems if libraries compiled with older GCC versions are called but can be safely ignored if all code is built with a GCC version >= 7.1 and those warnings can be suspressed with
-Wno-psabi. So I assume that this won’t be any problem, but I’m not really sure if I should expect any issues here. For your information, this targets a embedded linux which is based on a buildroot system that was compiled with the same GCC 8 toolchain I use to compile my JUCE code, however it runs a quite old Linux kernel that was definetively built with an older GCC. Any issues to expect from this combination?
Edit: I read the following in the GCC changelog:
On ARM targets (arm*--), a bug introduced in GCC 5 that affects conformance to the procedure call standard (AAPCS) has been fixed. The bug affects some C++ code where class objects are passed by value to functions and could result in incorrect or inconsistent code being generated. This is an ABI change.
This makes me come to the conclusion that this ABI change should in no way generate problems when operating with the old (pure C based) Linux kernel, furthermore I don’t see where the juce code accesses other precompiled C++ libraries where this change could cause a problem. Please correct me if I’m wrong. Would the JUCE team consider to wrap the code segments (mainly from juce_events and juce_data structures) in a
#pragma GCC diagnostic ignored "-Wpsabi" block to suppress these warnings?