2025-02-11 7:45 AM
Dear Gfx Team,
When building Gfx in CubeIDE 1.17, C++20 compiler,
in file framework\include\platform\core\MCUInstrumentation.hpp ,
statement 'cc_consumed += cc_temp' causes this warning
../Middlewares/ST/touchgfx/framework/include/platform/core/MCUInstrumentation.hpp: In member function 'virtual void touchgfx::MCUInstrumentation::setMCUActive(bool)':
../Middlewares/ST/touchgfx/framework/include/platform/core/MCUInstrumentation.hpp:73:37: warning: compound assignment with 'volatile'-qualified left operand is deprecated [-Wvolatile]
73 | cc_consumed += cc_temp;
| ~~~~~~~~~~~~^~~~~~~~~~
If you could please change it to
cc_consumed = cc_consumed + cc_temp;
With this change the warning is no longer.
Thanks
Ferro
Solved! Go to Solution.
2025-02-27 2:45 AM
Thanks. We will change in a later release.
Remember you can also just change your copy. Either in the Middlewares folder or in your installation.
Pavel is also correct, but remember this code is C++98 :)
Thanks for comments.
2025-02-12 3:59 PM
This looks like misuse of volatile instead of atomic ((
2025-02-27 2:45 AM
Thanks. We will change in a later release.
Remember you can also just change your copy. Either in the Middlewares folder or in your installation.
Pavel is also correct, but remember this code is C++98 :)
Thanks for comments.
2025-02-27 6:41 AM
"We will change in a later release."
Lovely. Thanks @Flemming Gram CHRISTENSEN
"you can also just change your copy"
I do. It is suboptimal.
"this code is C++98"
Old is gold. This is very interesting. It would be great to learn more about the TouchGfx/codebase history - why it still uses 'C++98, what aspects of the ecosystem hold Gfx back from adopting a newer standard, etc. Perhaps a 'Knowledge Base' article could cover this.