aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/expr.cc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-05-16 10:36:49 +0200
committerMartin Liska <mliska@suse.cz>2022-05-24 13:26:47 +0200
commitc5c523723149112d117a6d3b259dfd95b032a545 (patch)
treeafaca4f3b75924c720fbbe685b9b4a6ea9383e5b /gcc/d/expr.cc
parent3677eb80b683cead7db972bc206fd2e75d997bd2 (diff)
downloadgcc-c5c523723149112d117a6d3b259dfd95b032a545.zip
gcc-c5c523723149112d117a6d3b259dfd95b032a545.tar.gz
gcc-c5c523723149112d117a6d3b259dfd95b032a545.tar.bz2
Mitigate -Wmaybe-uninitialized in expmed.cc.
It's the warning I see every time I build GCC: In file included from /home/marxin/Programming/gcc/gcc/coretypes.h:478, from /home/marxin/Programming/gcc/gcc/expmed.cc:26: In function ‘poly_uint16 mode_to_bytes(machine_mode)’, inlined from ‘typename if_nonpoly<typename T::measurement_type>::type GET_MODE_SIZE(const T&) [with T = scalar_int_mode]’ at /home/marxin/Programming/gcc/gcc/machmode.h:647:24, inlined from ‘rtx_def* emit_store_flag_1(rtx, rtx_code, rtx, rtx, machine_mode, int, int, machine_mode)’ at /home/marxin/Programming/gcc/gcc/expmed.cc:5728:56: /home/marxin/Programming/gcc/gcc/machmode.h:550:49: warning: ‘*(unsigned int*)((char*)&int_mode + offsetof(scalar_int_mode, scalar_int_mode::m_mode))’ may be used uninitialized [-Wmaybe-uninitialized] 550 | ? mode_size_inline (mode) : mode_size[mode]); | ^~~~ /home/marxin/Programming/gcc/gcc/expmed.cc: In function ‘rtx_def* emit_store_flag_1(rtx, rtx_code, rtx, rtx, machine_mode, int, int, machine_mode)’: /home/marxin/Programming/gcc/gcc/expmed.cc:5657:19: note: ‘*(unsigned int*)((char*)&int_mode + offsetof(scalar_int_mode, scalar_int_mode::m_mode))’ was declared here 5657 | scalar_int_mode int_mode; | ^~~~~~~~ Can we please mitigate it? gcc/ChangeLog: * expmed.cc (emit_store_flag_1): Mitigate -Wmaybe-uninitialized warning.
Diffstat (limited to 'gcc/d/expr.cc')
0 files changed, 0 insertions, 0 deletions