Current winnt.h defines MemoryBarrier macro fallback as
# define MemoryBarrier
but I realzied in one project, which hit this fallback, that it breaks build with a gcc error, because the macro is usually called as:
MemoryBarrier();
which expands with this fallback into:
();
on which gcc stops with an error. A fix for this is very simple, just define the fallback macro as:
# define MemoryBarrier()
which will also "eat" the brackets. Propose patch is attached.
Diff:
Yes, the definition is inappropriate, but this is a duplicate of [#2131].
Related
Issues:
#2131