-Wsign-compare warning in verilated.cpp #1437
Labels
area: configure/compiling
Issue involves configuring or compilating Verilator itself
resolution: fixed
Closed; fixed
Author Name: Sergey Kvachonok (@ravenexp)
Original Redmine Issue: 1437 from https://www.veripool.org
Original Assignee: Sergey Kvachonok (@ravenexp)
I do not use verilated.mk to compile the generated C++ code, and I get these warnings (CFLAGS = -Wall -Wextra)
I've modified VL_WRITEMEM_N() to use unsigned size and offset integer types throughout and moved the address range checks out of the writing loop.
I believe it is better to fail these checks as early as possible and avoid creating empty or incomplete memory dump files.
now aborts with an error message instead of creating an empty dump file.
I tested the attached patch with 'make test_regress' only, as I don't use $writemem() myself.
Please review.
The text was updated successfully, but these errors were encountered: