[Mesa-dev] [PATCH 2/3] mesa: added msvc HAS_TRIVIAL_DESTRUCTOR implementation

Kyriazis, George george.kyriazis at intel.com
Tue Nov 8 22:46:44 UTC 2016



> -----Original Message-----
> From: Jose Fonseca [mailto:jfonseca at vmware.com]
> Sent: Tuesday, November 8, 2016 4:12 PM
> To: Kyriazis, George <george.kyriazis at intel.com>; mesa-
> dev at lists.freedesktop.org
> Subject: Re: [Mesa-dev] [PATCH 2/3] mesa: added msvc
> HAS_TRIVIAL_DESTRUCTOR implementation
> 
> On 07/11/16 22:32, George Kyriazis wrote:
> > not having it on windows causes a CANARY assertion in
> > src/util/ralloc.c:get_header()
> >
> > Tested only on MSVC 19.00 (DevStudio 14.0), so #ifdef guards reflect that.
> > ---
> >  src/util/macros.h | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/src/util/macros.h b/src/util/macros.h index
> > 27d1b62..12b26d3 100644
> > --- a/src/util/macros.h
> > +++ b/src/util/macros.h
> > @@ -175,6 +175,11 @@ do {                       \
> >  #      if __has_feature(has_trivial_destructor)
> >  #         define HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
> >  #      endif
> > +#   elif defined(_MSC_VER) && !defined(__INTEL_COMPILER)
> > +#      if _MSC_VER >= 1900
> > +#         define HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
> > +#      else
> 
> #else is redundant her.  Otherwise looks good.
> 
No problem.  I'll remove.

George

> Reviewed-by: Jose Fonseca <jfonseca at vmware.com>
> 
> > +#      endif
> >  #   endif
> >  #   ifndef HAS_TRIVIAL_DESTRUCTOR
> >         /* It's always safe (if inefficient) to assume that a
> >



More information about the mesa-dev mailing list