From: Mikhail Krichanov
Provides a variant of the DEBUG macro for clang when MDEPKG_NDEBUG is
defined, which uses but discards the contained expression. This means
clang can tell that it has optimised away variable usage as part of
valid debug patterns (such as a STATIC variable which is only use
On Tue, 12 Dec 2023 at 21:45, wrote:
>
> From: Mikhail Krichanov
>
> Provides a variant of the DEBUG macro for clang when MDEPKG_NDEBUG is
> defined, which uses but discards the contained expression. This means
> clang can tell that it has optimised away variable usage as part of
> valid debug pa
On Tue, 12 Dec 2023 at 22:46, Mike Beaton wrote:
>
> From: Mikhail Krichanov
>
> Provides a variant of the DEBUG macro for clang when MDEPKG_NDEBUG is
> defined, which uses but discards the contained expression. This means
> clang can tell that it has optimised away variable usage as part of
> va
> > +#define DEBUG(Expression)\
> > +do { \
> > + _Pragma("GCC diagnostic push") \
> > + _Pragma("GCC diagnostic ignored \"-Wunused-value\"") \
> > + if ((FALSE)) {