[lttng-dev] [PATCH 11/11] urcu/annotate: Add CMM annotation

Olivier Dion odion at efficios.com
Tue May 16 11:57:11 EDT 2023


On Tue, 16 May 2023, Tony Finch <dot at dotat.at> wrote:
> The __has_feature pseudo-macro interacts in fun ways with preprocessor
> expression evaluation, because when it is undefined and you write
>
> 	#if defined(__has_feature) && __has_feature(thread_sanitizer)
>
> macro expansion gives you a syntax error
>
> 	#if 0 && 0(thread_sanitizer)
>
> so it must be split into two #if expressions, thus:

TIL.  Thank you for that!

-- 
Olivier Dion
EfficiOS Inc.
https://www.efficios.com


More information about the lttng-dev mailing list