# OpenCV variadic macro not standard compliant [closed]

Hi,

i just tried to compile OpenCV 2.4.2 with Oracle Studio 12 under Solaris 10 x86, but i get the following error:

... ".../OpenCV-2.4.2/modules/ts/src/ts_perf.cpp", line 115: Warning: Too few arguments in macro LOGE. ".../OpenCV-2.4.2/modules/ts/src/ts_perf.cpp", line 115: Error: Trailing comma in a parameter list. ...

As i found out LOGE is defined in modules/ts/include/opencv2/ts/ts_perf.hpp as

define LOGE(_str, ...) do{printf(_str , ## __VA_ARGS__); printf("\n");fflush(stdout);} while(0)

Here, a gcc extension ("##" - the meaning is explained in the documentation link:here. It is as an extension provided by gcc. But it is a serious problem for other compilers, because it's not standard compliant.

Any help how to solve this issue?

Thanks

Julian

edit retag reopen merge delete

### Closed for the following reason question is not relevant or outdated by sturkmen close date 2020-09-27 10:18:46.333619

But we can consider it as a bug possibly. Look, perf tests are working OK on Linux, Android and Windows (read: MS VS compiler). And you can see that for the LOGE definition conditional compilation is used. So, if it is broken on Solaris, #if pragmas should be updated and LOGE implementation compatible with compiler from Oracle Studio 12 is needed.