diff options
author | Milan Jaros <jar091> | 2018-04-02 17:11:11 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-02 17:39:04 +0300 |
commit | 888a04c7e4e6002ac7d757fdb6d443561de696dd (patch) | |
tree | 10116ab1ac475a60684dfe6eb0f6e06459b97717 /source | |
parent | 692aeb6fe0e4314a17cf15c7252d2bfa21a1c9c6 (diff) |
Build: fixes for the Intel compiler versions 2016, 2017, 2018.
Differential Revision: https://developer.blender.org/D3109
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/displist.c | 5 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_utildefines.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index 2a300cbe47b..8433634f749 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -297,7 +297,10 @@ bool BKE_displist_surfindex_get(DispList *dl, int a, int *b, int *p1, int *p2, i } /* ****************** make displists ********************* */ - +#ifdef __INTEL_COMPILER +/* ICC with the optimization -02 causes crashes. */ +# pragma intel optimization_level 1 +#endif static void curve_to_displist(Curve *cu, ListBase *nubase, ListBase *dispbase, const bool for_render, const bool use_render_resolution) { diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h index 11c8a586784..46b3748c7ce 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -411,7 +411,7 @@ extern "C" { } (void)0 /* assuming a static array */ -#if defined(__GNUC__) && !defined(__cplusplus) && !defined(__clang__) +#if defined(__GNUC__) && !defined(__cplusplus) && !defined(__clang__) && !defined(__INTEL_COMPILER) # define ARRAY_SIZE(arr) \ ((sizeof(struct {int isnt_array : ((const void *)&(arr) == &(arr)[0]);}) * 0) + \ (sizeof(arr) / sizeof(*(arr)))) |