-
Notifications
You must be signed in to change notification settings - Fork 95
Closed
Description
step to reproduce.
- apply this commit fix build for clang #12
- build with
CFLAGS="-Werror -Wbitfield-constant-conversion" CXXFLAGS="-Werror -Wbitfield-constant-conversion" cmake .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
you will see errors like this:
/sdb/other/gmmlib/Source/GmmLib/CachePolicy/GmmGen10CachePolicy.h:130:1: error: implicit truncation from 'int' to bit-field changes value from 3 to 1 [-Werror,-Wbitfield-constant-conversion]
DEFINE_CACHE_ELEMENT(CM_RESOURCE_USAGE_NO_LLC_L3_SurfaceState, 0 , 1 , 0 , 3 ,3, 0, 0, 0, 0, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/sdb/other/gmmlib/Source/GmmLib/CachePolicy/GmmGen10CachePolicy.cpp:45:96: note: expanded from macro 'DEFINE_CACHE_ELEMENT'
#define DEFINE_CACHE_ELEMENT(usage, llc, ellc, l3, wt, age, lecc_scc, l3_scc, sso, cos, hdcl1) DEFINE_CP_ELEMENT(usage, llc, ellc, l3, wt, age, 0, lecc_scc, l3_scc, 0, sso, cos, hdcl1, 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/sdb/other/gmmlib/Source/GmmLib/inc/External/Common/CachePolicy/../GmmCachePolicyCommon.h:83:53: note: expanded from macro 'DEFINE_CP_ELEMENT'
pCachePolicy[Usage].WT = (wt); \
^ ~~~~
The WT is 1 bits variable but the code assign 3 to it
please conside fix it.thanks
Metadata
Metadata
Assignees
Labels
No labels