Fix GCC format warning
This commit is contained in:
parent
86f08a341c
commit
4a1697a1b5
|
|
@ -269,12 +269,14 @@ y.tab.c: verilog.y $(HEADERS) bisonpre
|
||||||
$(PERL) $(BISONPRE) --yacc ${YACC} -d -v -o y.tab.c $<
|
$(PERL) $(BISONPRE) --yacc ${YACC} -d -v -o y.tab.c $<
|
||||||
|
|
||||||
V3Lexer_pregen.yy.cpp: verilog.l y.tab.h $(HEADERS)
|
V3Lexer_pregen.yy.cpp: verilog.l y.tab.h $(HEADERS)
|
||||||
|
${LEX} --version
|
||||||
${LEX} ${LFLAGS} -o$@ $<
|
${LEX} ${LFLAGS} -o$@ $<
|
||||||
|
|
||||||
V3Lexer.yy.cpp: V3Lexer_pregen.yy.cpp
|
V3Lexer.yy.cpp: V3Lexer_pregen.yy.cpp
|
||||||
$(PERL) $(srcdir)/flexfix <$< >$@
|
$(PERL) $(srcdir)/flexfix <$< >$@
|
||||||
|
|
||||||
V3PreLex_pregen.yy.cpp: V3PreLex.l $(HEADERS)
|
V3PreLex_pregen.yy.cpp: V3PreLex.l $(HEADERS)
|
||||||
|
${LEX} --version
|
||||||
${LEX} ${LFLAGS} -o$@ $<
|
${LEX} ${LFLAGS} -o$@ $<
|
||||||
|
|
||||||
V3PreLex.yy.cpp: V3PreLex_pregen.yy.cpp
|
V3PreLex.yy.cpp: V3PreLex_pregen.yy.cpp
|
||||||
|
|
|
||||||
|
|
@ -477,9 +477,10 @@ public:
|
||||||
assigntop->iterateAndNext(*this);
|
assigntop->iterateAndNext(*this);
|
||||||
}
|
}
|
||||||
for (int word=VL_WORDS_I(nodep->num().minWidth())-1; word>0; word--) {
|
for (int word=VL_WORDS_I(nodep->num().minWidth())-1; word>0; word--) {
|
||||||
ofp()->printf(",0x%08x", nodep->num().dataWord(word));
|
// Only 32 bits - llx + long long here just to appease CPP format warning
|
||||||
|
ofp()->printf(",0x%08llx", (long long)(nodep->num().dataWord(word)));
|
||||||
}
|
}
|
||||||
ofp()->printf(",0x%08x)", nodep->num().dataWord(0));
|
ofp()->printf(",0x%08llx)", (long long)(nodep->num().dataWord(0)));
|
||||||
} else if (nodep->isQuad()) {
|
} else if (nodep->isQuad()) {
|
||||||
vluint64_t num = nodep->toUQuad();
|
vluint64_t num = nodep->toUQuad();
|
||||||
if (num<10) ofp()->printf("VL_ULL(%lld)", (long long)num);
|
if (num<10) ofp()->printf("VL_ULL(%lld)", (long long)num);
|
||||||
|
|
@ -487,7 +488,7 @@ public:
|
||||||
} else {
|
} else {
|
||||||
uint32_t num = nodep->toUInt();
|
uint32_t num = nodep->toUInt();
|
||||||
if (num<10) puts(cvtToStr(num));
|
if (num<10) puts(cvtToStr(num));
|
||||||
else ofp()->printf("0x%x", num);
|
else ofp()->printf("0x%llx", (long long)num);
|
||||||
//Unneeded-Causes %lx format warnings:
|
//Unneeded-Causes %lx format warnings:
|
||||||
// if (!nodep->num().isSigned() && (num & (1UL<<31))) puts("U");
|
// if (!nodep->num().isSigned() && (num & (1UL<<31))) puts("U");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue