[Libav-user] g++ 4.7.2 fails to compile av_err2str
"René J.V. Bertin"
rjvbertin at gmail.com
Mon Jan 14 12:31:30 CET 2013
On Jan 14, 2013, at 11:42, Alex Cohn wrote:
>> used later on. Semantics imposed by C++?
>>
>> R.
>
> An easy test proves that adding "-x c" to command line resolves the
> problem. So it is a C++ artifact.
As I feared.
Note that the OP's tst_gxx.cpp does a simple
av_err2str(AVERROR_BUG);
i.e. stand-alone instead of using the function call as an argument to another function as is stipulated in the doxygen doc for av_err2str in my version of the code. Is it certain that the scope and type of a variable declared (char[SIZE]){0} in a function argument list is well defined and identical across all compilers? I personally find it an unreadable and ambiguous construct...
R
More information about the Libav-user
mailing list