[MPlayer-dev-eng] [PATCH] Fix building with Clang

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Dec 23 12:08:26 EET 2021



> On 22 Dec 2021, at 14:15, Brad Smith <brad at comstyle.com> wrote:
> 
> On 12/20/2021 10:47 AM, Reimar Döffinger wrote:
> 
>> 
>>> On 10 Dec 2021, at 07:48, Brad Smith <brad at comstyle.com> wrote:
>>> 
>>> Fix building with Clang.
>>> 
>>> 
>>> ./stream/stream.h:322:46: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
>>>  mp_dbg(MSGT_DEMUX, MSGL_DBG3, "seek to 0x%"PRIX64"\n", pos);
>>>                                             ^
>>> 
>>> ./stream/stream.h:326:49: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
>>>           "Invalid seek to negative position %"PRIx64"!\n", pos);
>> Sorry for the late reply, but I think this needs a bit more details/explanation.
>> 1) I’ve quickly tested on macOS which uses clang and it has no issues, so this can’t be a problem with clang in general I think?
>> 2) MPlayer is not C++11, in fact it is not C++ at all, so this messages does not really make sense. Sure it’s not a bug in clang, or maybe you used clang++ instead of clang as compiler?
>> 
>> Now the change is not a big deal, it’s just that I am not a big fan of working around issues that are not properly understood, also because if it’s a real issue the commit message should make it clear how we can avoid re-introducing such issues in the future.
> 
> Hi Reimar,
> 
> I'll provide some further context to the error messages when I get home later on today.

One thing I've not tested is the "live555" support since that's rather outdated, I think there aren't even updated releases of that code anymore.
That is C++, however the headers would be included as extern "C" so it would still sound like a clang issue.
Also not sure if --enable-debug setting would make a difference.


More information about the MPlayer-dev-eng mailing list