Hi,
You are right it is c++ related error, it is error not warning.
About gcc warnings:
warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
Is it possible to add this and solve these all warnings:
#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wduplicate-decl-specifier"
#endif