From 69043549d6c4e7db30effcc9896ed650d61c9c81 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sat, 6 Jan 2024 17:26:07 -0500 Subject: [PATCH] Fix const anon union (#4800) --- include/verilated_trace.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/verilated_trace.h b/include/verilated_trace.h index b4b053b42..cdf42adf1 100644 --- a/include/verilated_trace.h +++ b/include/verilated_trace.h @@ -209,11 +209,11 @@ private: // (the one in Ubuntu 14.04 with GCC 4.8.4 in particular) use the // assignment operator on inserting into collections, so they don't work // with const fields... - const union { // The callback - initCb_t m_initCb; - dumpCb_t m_dumpCb; - dumpOffloadCb_t m_dumpOffloadCb; - cleanupCb_t m_cleanupCb; + union { // The callback + const initCb_t m_initCb; + const dumpCb_t m_dumpCb; + const dumpOffloadCb_t m_dumpOffloadCb; + const cleanupCb_t m_cleanupCb; }; const uint32_t m_fidx; // The index of the tracing function void* const m_userp; // The user pointer to pass to the callback (the symbol table)