Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
b63a0c5
Fix -Wextra warnings
stefanatwork Jun 9, 2026
bfdcf9d
Add -Wdouble-promotion, -Wextra-semi, -Wundefined-inline fixes; updat…
stefanatwork Jun 9, 2026
99ed174
Fix remaining tutorial warnings for GCC and Clang
stefanatwork Jun 9, 2026
0ce622d
Add -Werror to SYCL build and fix warnings
stefanatwork Jun 9, 2026
aeb1ca1
Removed __extension__, disabled warning for anonymous structs
stefanatwork Jun 15, 2026
e1f6a6c
Enable /W4 /WX on MSVC and suppress intentional-pattern warnings
stefanatwork Jun 16, 2026
288bb0c
Fix MSVC /W4 warnings in common library and kernels
stefanatwork Jun 16, 2026
4931c78
Fix MSVC /W4 warnings in tutorials
stefanatwork Jun 16, 2026
fbefc0a
Fix dpcpp.cmake to recognise icx-cl as the ICX compiler on Windows
stefanatwork Jun 16, 2026
eecccf3
Fix SYCL/ICX warnings in tutorial SYCL device code
stefanatwork Jun 16, 2026
7376304
Fix -Warith-conversion incompatibility with GCC < 10 on Rocky Linux 8
Copilot Jun 15, 2026
ebcf1c9
Fix shift-overflow warning for CPU_FEATURE_BIT_AVX512VL
stefanatwork Jun 17, 2026
76e9f86
Fix fill() using stale member vertices instead of locals
stefanatwork Jun 17, 2026
f3c3de5
Fix update() in quadv.h using member v3 instead of local lv3
stefanatwork Jun 17, 2026
0706568
Fix imgui CMakeLists: always apply FLAGS_LOWEST, gate warning flag to…
stefanatwork Jun 17, 2026
ffbec7a
Fix sign-compare warning in user_geometry_device.cpp
stefanatwork Jun 17, 2026
bd8ae3b
Fix -Wundefined-internal in minimal_sycl.cpp
stefanatwork Jun 17, 2026
0aaac5a
Fix -Wdeprecated-declarations from SYCL runtime headers in device pass
stefanatwork Jun 17, 2026
45b4bdf
cmake: treat Intel SYCL runtime headers as system headers on Windows
stefanatwork Jun 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions common/algorithms/parallel_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ namespace embree
if (k0 > r1) break;
Index k1 = k0+nused[i];
Index src = begin+(i+0)*(end-begin)/taskCount+nused[i];
for (Index i=max(r0,k0); i<min(r1,k1); i++) {
Index isrc = src-i+k0-1;
for (Index j=max(r0,k0); j<min(r1,k1); j++) {
Index isrc = src-j+k0-1;
assert(dst >= begin && dst < end);
assert(isrc >= begin && isrc < end);
data[dst++] = data[isrc];
Expand Down
12 changes: 6 additions & 6 deletions common/algorithms/parallel_for_for.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,22 @@ namespace embree
__forceinline void init ( const size_t numArrays, const SizeFunc& getSize, const size_t minStepSize )
{
/* first calculate total number of elements */
size_t N = 0;
size_t num = 0;
for (size_t i=0; i<numArrays; i++) {
N += getSize(i);
num += getSize(i);
}
this->N = N;
this->N = num;

/* calculate number of tasks to use */
const size_t numThreads = TaskScheduler::threadCount();
const size_t numBlocks = (N+minStepSize-1)/minStepSize;
const size_t numBlocks = (num+minStepSize-1)/minStepSize;
taskCount = max(size_t(1),min(numThreads,numBlocks,size_t(ParallelForForState::MAX_TASKS)));

/* calculate start (i,j) for each task */
size_t taskIndex = 0;
i0[taskIndex] = 0;
j0[taskIndex] = 0;
size_t k0 = (++taskIndex)*N/taskCount;
size_t k0 = (++taskIndex)*num/taskCount;
for (size_t i=0, k=0; taskIndex < taskCount; i++)
{
assert(i<numArrays);
Expand All @@ -66,7 +66,7 @@ namespace embree
i0[taskIndex] = i;
j0[taskIndex] = j += k0-k;
k=k0;
k0 = (++taskIndex)*N/taskCount;
k0 = (++taskIndex)*num/taskCount;
}
k+=M-j;
}
Expand Down
2 changes: 1 addition & 1 deletion common/algorithms/parallel_partition.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace embree
template<typename T, typename V, typename Vi, typename IsLeft, typename Reduction_T, typename Reduction_V>
class __aligned(64) parallel_partition_task
{
ALIGNED_CLASS_(64);
ALIGNED_CLASS_(64)
private:

static const size_t MAX_TASKS = 64;
Expand Down
20 changes: 10 additions & 10 deletions common/algorithms/parallel_sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ namespace embree
private:

void tbbRadixIteration0(const Key shift,
const Ty* __restrict const src,
const Ty* __restrict const pSrc,
Ty* __restrict const dst,
const size_t threadIndex, const size_t threadCount)
{
Expand All @@ -321,16 +321,16 @@ namespace embree
#endif
for (size_t i=startID; i<endID; i++) {
#if defined(__64BIT__)
const size_t index = ((size_t)(Key)src[i] >> (size_t)shift) & (size_t)mask;
const size_t index = ((size_t)(Key)pSrc[i] >> (size_t)shift) & (size_t)mask;
#else
const Key index = ((Key)src[i] >> shift) & mask;
const Key index = ((Key)pSrc[i] >> shift) & mask;
#endif
count[index]++;
}
}

void tbbRadixIteration1(const Key shift,
const Ty* __restrict const src,
const Ty* __restrict const pSrc,
Ty* __restrict const dst,
const size_t threadIndex, const size_t threadCount)
{
Expand Down Expand Up @@ -381,23 +381,23 @@ namespace embree
#pragma nounroll
#endif
for (size_t i=startID; i<endID; i++) {
const Ty elt = src[i];
const Ty elt = pSrc[i];
#if defined(__64BIT__)
const size_t index = ((size_t)(Key)src[i] >> (size_t)shift) & (size_t)mask;
const size_t index = ((size_t)(Key)pSrc[i] >> (size_t)shift) & (size_t)mask;
#else
const size_t index = ((Key)src[i] >> shift) & mask;
const size_t index = ((Key)pSrc[i] >> shift) & mask;
#endif
dst[offset[index]++] = elt;
}
}

void tbbRadixIteration(const Key shift, const bool last,
const Ty* __restrict src, Ty* __restrict dst,
const Ty* __restrict pSrc, Ty* __restrict dst,
const size_t numTasks)
{
affinity_partitioner ap;
parallel_for_affinity(numTasks,[&] (size_t taskIndex) { tbbRadixIteration0(shift,src,dst,taskIndex,numTasks); },ap);
parallel_for_affinity(numTasks,[&] (size_t taskIndex) { tbbRadixIteration1(shift,src,dst,taskIndex,numTasks); },ap);
parallel_for_affinity(numTasks,[&] (size_t taskIndex) { tbbRadixIteration0(shift,pSrc,dst,taskIndex,numTasks); },ap);
parallel_for_affinity(numTasks,[&] (size_t taskIndex) { tbbRadixIteration1(shift,pSrc,dst,taskIndex,numTasks); },ap);
}

void tbbRadixSort(const size_t numTasks)
Expand Down
16 changes: 16 additions & 0 deletions common/cmake/clang.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,23 @@ ELSE()

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") # enables most warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra") # enables extra warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic") # enables pedantic warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security") # enables string format vulnerability warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter") # disables warnings for unused function parameters
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-cast-function-type") # disables warnings for intentional function pointer casts
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-copy") # disables deprecated copy warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wundef") # warn about undefined preprocessor identifiers
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow") # warn about shadowed variables
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wfloat-equal") # warn about floating point equality checks
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-cast-align") # disable: intentional aligned loads in SIMD code
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-float-equal") # disable: intentional exact-zero checks in normalize_safe
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-shadow") # disable: pervasive in vector class constructors
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-nested-anon-types") # disable: anonymous types in unions for SIMD
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-anonymous-struct") # disable: anonymous structs in unions for SIMD
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-sign-compare") # disable: int/size_t comparisons in template code
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++17-attribute-extensions") # disable: [[fallthrough]] etc in C++11 mode
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") # treat all warnings as errors
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char") # treat char as signed on all processors, including ARM
IF (NOT APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") # enables support for more secure position independent execution
Expand Down
24 changes: 20 additions & 4 deletions common/cmake/dpcpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ GET_FILENAME_COMPONENT(SYCL_COMPILER_DIR ${CMAKE_CXX_COMPILER} PATH)
GET_FILENAME_COMPONENT(SYCL_COMPILER_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
IF (NOT SYCL_COMPILER_NAME STREQUAL "clang++")
SET(SYCL_ONEAPI TRUE)
IF (SYCL_COMPILER_NAME STREQUAL "icx" OR SYCL_COMPILER_NAME STREQUAL "icpx")
IF (SYCL_COMPILER_NAME STREQUAL "icx" OR SYCL_COMPILER_NAME STREQUAL "icpx" OR SYCL_COMPILER_NAME STREQUAL "icx-cl")
SET(SYCL_ONEAPI_ICX TRUE)
ELSE()
SET(SYCL_ONEAPI_ICX FALSE)
Expand Down Expand Up @@ -144,10 +144,19 @@ IF (EMBREE_SYCL_SUPPORT)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pessimizing-move") # disabled: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]

IF (SYCL_ONEAPI_ICX AND WIN32)
IF (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL 2024.0)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I\"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl\" -I\"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl/sycl\"") # disable warning from SYCL header
IF (SYCL_COMPILER_NAME STREQUAL "icx-cl")
# icx-cl is MSVC-compatible: use -imsvc (clang-cl equivalent of -isystem)
IF (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL 2024.0)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -imsvc \"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl\" -imsvc \"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl/sycl\"") # treat Intel SYCL runtime headers as system headers (suppresses their internal warnings)
ENDIF()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -imsvc \"${SYCL_COMPILER_DIR}/../include/sycl\" -imsvc \"${SYCL_COMPILER_DIR}/../include/\"") # treat Intel SYCL runtime headers as system headers (suppresses their internal warnings)
ELSE()
# icx/icpx on Windows: GCC-compatible frontend, use -isystem
IF (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL 2024.0)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem \"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl\" -isystem \"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl/sycl\"") # treat Intel SYCL runtime headers as system headers (suppresses their internal warnings)
ENDIF()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem \"${SYCL_COMPILER_DIR}/../include/sycl\" -isystem \"${SYCL_COMPILER_DIR}/../include/\"") # treat Intel SYCL runtime headers as system headers (suppresses their internal warnings)
ENDIF()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I\"${SYCL_COMPILER_DIR}/../include/sycl\" -I\"${SYCL_COMPILER_DIR}/../include/\"") # disable warning from SYCL header
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qstd=c++17")
ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
Expand Down Expand Up @@ -220,7 +229,14 @@ ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORTIFY_SOURCE=2") # perform extra security checks for some standard library calls
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char") # treat char as signed on all processors, including ARM
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") # enables most warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra") # enables extra warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security") # enables string format vulnerability warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter") # disables warnings for unused function parameters
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-cast-function-type") # disables warnings for intentional function pointer casts
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-cast-function-type-mismatch") # disables warnings for intentional function pointer casts
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-sign-compare") # disable: int/size_t comparisons in template code
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-field-initializers") # disable: intentional partial struct init with zero fill
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") # treat all warnings as errors
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffp-model=precise") # makes dpcpp compiler compatible with clang++
ENDIF()

Expand Down
25 changes: 24 additions & 1 deletion common/cmake/gnu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,31 @@ IF (EMBREE_ARM)
ENDIF (EMBREE_ARM)

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") # enables most warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra") # enables extra warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security") # enables string format vulnerability warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-class-memaccess") # disables clearing an object of type ‘XXX’ with no trivial copy-assignment; use assignment or value-initialization instead
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-class-memaccess") # disables clearing an object of type
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter") # disables warnings for unused function parameters
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-cast-function-type") # disables warnings for intentional function pointer casts
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-copy") # disables deprecated copy warnings from explicit operator= ‘XXX’ with no trivial copy-assignment; use assignment or value-initialization instead
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wundef") # warn about undefined preprocessor identifiers
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnull-dereference") # warn about potential NULL dereferences
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wduplicated-cond") # warn about duplicated conditions in if/else
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-duplicated-branches") # disable: intentional identical branch values (e.g. PATCH_MAX_EVAL_DEPTH_*)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wlogical-op") # warn about logical operations with constant operands
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wrestrict") # warn about overlapping memcpy arguments
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshift-overflow=2") # warn about undefined shift behavior
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Walloc-size-larger-than=9223372036854775807") # warn about allocation exceeding max object size
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wstringop-overflow") # warn about buffer overflow in string operations
IF (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "10.0")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Warith-conversion") # warn about implicit arithmetic conversions (GCC 10+)
ENDIF()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-cast-align") # disable: intentional aligned loads in SIMD code
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-declarations") # disable: intentional factory pattern without declarations
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-shadow") # disable: pervasive in vector class constructors
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-float-equal") # disable: intentional exact-zero checks in normalize_safe
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-nested-anon-types") # disable: anonymous types in unions for SIMD
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wredundant-decls") # warn about redundant declarations
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")

# these prevent compile to optimize away security checks
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-overflow") # assume that signed overflow occurs
Expand Down
15 changes: 15 additions & 0 deletions common/cmake/msvc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /EHsc") # catch C++ exceptions
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /MP") # compile source files in parallel
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /GR") # enable runtime type information (on by default)
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /Gy") # package individual functions
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /W4") # enable highest practical warning level
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /WX") # treat warnings as errors
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /wd4100") # disable: unreferenced formal parameter (intentional in template/virtual code)
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /wd4127") # disable: conditional expression is constant (intentional in template/SIMD code)
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /wd4201") # disable: nonstandard extension used: nameless struct/union (intentional for SIMD vec types)
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /wd4244") # disable: conversion from X to Y, possible loss of data (intentional in SIMD/geometry math)
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /wd4267") # disable: conversion from size_t to smaller type (intentional in index arithmetic)
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /wd4324") # disable: structure was padded due to alignment specifier (intentional for SIMD alignment)
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /wd4512") # disable: assignment operator could not be generated (C++03 compat, types with const members)
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /wd4714") # disable: function marked __forceinline not inlined (compiler decision, not an error)
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /wd4702") # disable: unreachable code (false-positive in heavily-inlined/templated code)
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /wd4800") # disable: implicit conversion from int to bool (intentional in flag/mask code)
IF (EMBREE_STACK_PROTECTOR)
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /GS") # protects against return address overrides
ELSE()
Expand All @@ -26,6 +38,9 @@ ENDMACRO()
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEPENDENTLOADFLAG:0x2000")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEPENDENTLOADFLAG:0x2000")

# Remove CMake-injected /W3 so our /W4 is unambiguous
STRING(REPLACE "/W3" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")

SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS}")
STRING(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}) # disable native runtime checks
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /DDEBUG") # enables assertions
Expand Down
2 changes: 1 addition & 1 deletion common/lexers/stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ namespace embree
: i(0), j(0), charNumber(0), name(std::shared_ptr<std::string>(new std::string(name)))
{
if (argc > 0) {
for (size_t i=0; argv[0][i] && i<1024; i++) charNumber++;
for (size_t ci=0; argv[0][ci] && ci<1024; ci++) charNumber++;
charNumber++;
}
for (ssize_t k=1; k<argc; k++) args.push_back(argv[k]);
Expand Down
4 changes: 2 additions & 2 deletions common/lexers/tokenstream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ namespace embree

/* build full tokenizer that takes list of valid characters and keywords */
TokenStream::TokenStream(const Ref<Stream<int> >& cin, //< stream to read from
const std::string& alpha, //< valid characters for identifiers
const std::string& alphaChars, //< valid characters for identifiers
const std::string& seps, //< characters that act as separators
const std::vector<std::string>& symbols) //< symbols
: cin(cin), symbols(symbols)
{
createCharMap(isAlphaMap,alpha);
createCharMap(isAlphaMap,alphaChars);
createCharMap(isSepMap,seps);
createCharMap(isStringCharMap,stringChars);
}
Expand Down
1 change: 1 addition & 0 deletions common/math/bbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ namespace embree
__forceinline BBox ( ) { }
template<typename T1>
__forceinline BBox ( const BBox<T1>& other ) : lower(other.lower), upper(other.upper) {}
BBox ( const BBox& other ) = default;
__forceinline BBox& operator=( const BBox& other ) { lower = other.lower; upper = other.upper; return *this; }

__forceinline BBox ( const T& v ) : lower(v), upper(v) {}
Expand Down
2 changes: 1 addition & 1 deletion common/math/emath.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ __forceinline float nmsub ( const float a, const float b, const float c) { retur
template<> __forceinline float random() { return rand()/float(RAND_MAX); }
template<> __forceinline double random() { return rand()/double(RAND_MAX); }

#if _WIN32
#ifdef _WIN32
__forceinline double drand48() {
return double(rand())/double(RAND_MAX);
}
Expand Down
Loading