diff options
author | Kito Cheng <kito.cheng@sifive.com> | 2022-08-29 10:28:28 +0800 |
---|---|---|
committer | Kito Cheng <kito.cheng@sifive.com> | 2022-08-29 10:32:21 +0800 |
commit | 7b9b6969a99725a171ee0ad4006cc39b0f7abf77 (patch) | |
tree | aab6f027e76c1201a52ae50c4cc4a612baf2c1eb /gcc/gimple-predicate-analysis.cc | |
parent | 31380d4b7925912b9c34afe8cdb8dffe6cd50b94 (diff) | |
download | gcc-7b9b6969a99725a171ee0ad4006cc39b0f7abf77.zip gcc-7b9b6969a99725a171ee0ad4006cc39b0f7abf77.tar.gz gcc-7b9b6969a99725a171ee0ad4006cc39b0f7abf77.tar.bz2 |
RISC-V: Suppress -Wclass-memaccess warning
poly_int64 is non-trivial type, we need to clean up manully instead
of memset to prevent this warning.
../../gcc/gcc/config/riscv/riscv.cc: In function 'void riscv_compute_frame_info()':
../../gcc/gcc/config/riscv/riscv.cc:4113:10: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct riscv_frame_info'; use assignment or value-initialization instead [-Werror=class-memaccess]
4113 | memset (frame, 0, sizeof (*frame));
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc/gcc/config/riscv/riscv.cc:101:17: note: 'struct riscv_frame_info' declared here
101 | struct GTY(()) riscv_frame_info {
| ^~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
gcc/ChangeLog:
* config/riscv/riscv.cc (riscv_frame_info): Introduce `reset(void)`;
(riscv_frame_info::reset(void)): New.
(riscv_compute_frame_info): Use riscv_frame_info::reset instead
of memset when clean frame.
Diffstat (limited to 'gcc/gimple-predicate-analysis.cc')
0 files changed, 0 insertions, 0 deletions