"foreach" Qt macro is widely used across QCustomPlot codebase.

There is a report about "foreach" macro bug.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90617

I had observed described behaviour with Qt 4.8.7 and gcc 9.3.0

As a solution one could patch Qt source, downgrade to older compiler or use another and etc.

Hope it can save some time anyone later.