Closed Diegovsky closed 1 year ago
When building, I get the following message:
g++ -MD -Wall -Werror -O3 -I. -c -o objs_linux/cc.o discrete_src/cc.cpp g++ -MD -Wall -Werror -O3 -I. -c -o objs_linux/operations.o discrete_src/operations.cpp discrete_src/operations.cpp: In function ‘void doAssign_X_E(WRValue*, WRValue*)’: discrete_src/operations.cpp:350:46: error: ‘element.WRValue::<anonymous>.WRValue::<unnamed union>::<anonymous>.WRValue::<unnamed union>::<unnamed struct>::type’ may be used uninitialized [-Werror=maybe-uninitialized] 350 | wr_assign[(WR_EX<<2)+element.type](to, &element); | ~~~~~~~~^~~~ discrete_src/operations.cpp:348:25: note: ‘element’ declared here 348 | WRValue element; | ^~~~~~~ cc1plus: all warnings being treated as errors make: *** [Makefile:47: objs_linux/operations.o] Error 1
Repo commit: 8c0447b g++ version: g++ (GCC) 12.2.0
g++ (GCC) 12.2.0
It was indeed possible if a default case was reached for the element to go uninitialized. In practice it "can't happen" but now it really can't. fixed in latest
Thank you :)
When building, I get the following message:
Repo commit: 8c0447b g++ version:
g++ (GCC) 12.2.0