[PATCH v2 1/3] debug.h: cleanup TRACE macros
Konstantin Kharlamov
hi-angel at yandex.ru
Mon Jan 28 12:01:17 CST 2019
On 28.01.2019 19:04, Alexandre Julliard wrote:
> Konstantin Kharlamov <hi-angel at yandex.ru> writes:
>
>> On 28.01.2019 12:24, Alexandre Julliard wrote:
>>> Konstantin Kharlamov <Hi-Angel at yandex.ru> writes:
>>>
>>>> The complex "#ifdef WINE_NO_TRACE_MSGS && __compiler__" ladder below
>>>> reduces to "ignore WINE_NO_TRACE_MSGS when !__GNUC__ && !__SUNPRO_C",
>>>> which is probably a bug.
>>>
>>> No, it's on purpose, because some other compiler may not support varargs
>>> macros.
>>
>> But then the workaround would result in incorrectly configured
>> build. Is the complexity of the original code really worth the not
>> even correct support of an obscure usecase?
>
> WINE_NO_TRACE_MSGS is simply an optimization, there's not much harm if
> it doesn't work on some obscure compiler. It's better than breaking the
> build.
Okay, thanks for your comments. I just checked whether I can just pass
static number of arguments, and I can't — the other definition of TRACE
unrolls to a macros with variadic args, but only for supported compilers.
I could probably define multiple macros with predefined number of args,
but I'm not sure if anybody wants this refactoring, so I'd just drop the
patches.
I still would like to hear your opinion on my reply in the other mail,
since as a Wine user I still would like to optimize it, and hence to get
the 3rd patch into the project.
More information about the wine-devel
mailing list