mirror of
https://github.com/verilator/verilator.git
synced 2025-01-12 01:27:36 +00:00
Internals: Fix GCC constant warnings.
This commit is contained in:
parent
f1960273a0
commit
fee4aba9ec
@ -305,8 +305,7 @@ private:
|
|||||||
return (nodep->lsbp()->castConst()
|
return (nodep->lsbp()->castConst()
|
||||||
&& nodep->widthp()->castConst()
|
&& nodep->widthp()->castConst()
|
||||||
&& nodep->lsbConst()==0
|
&& nodep->lsbConst()==0
|
||||||
&& (int)nodep->widthConst()==nodep->fromp()->width()
|
&& (int)nodep->widthConst()==nodep->fromp()->width());
|
||||||
&& 1);
|
|
||||||
}
|
}
|
||||||
bool operandSelExtend(AstSel* nodep) {
|
bool operandSelExtend(AstSel* nodep) {
|
||||||
// A pattern created by []'s after offsets have been removed
|
// A pattern created by []'s after offsets have been removed
|
||||||
|
@ -530,8 +530,7 @@ public:
|
|||||||
&& connBasicp->width() == pinBasicp->width()
|
&& connBasicp->width() == pinBasicp->width()
|
||||||
&& connBasicp->lsb() == pinBasicp->lsb()
|
&& connBasicp->lsb() == pinBasicp->lsb()
|
||||||
&& !connectRefp->varp()->isSc() // Need the signal as a 'shell' to convert types
|
&& !connectRefp->varp()->isSc() // Need the signal as a 'shell' to convert types
|
||||||
&& connBasicp->width() == pinVarp->width()
|
&& connBasicp->width() == pinVarp->width()) {
|
||||||
&& 1) {
|
|
||||||
// Done. One to one interconnect won't need a temporary variable.
|
// Done. One to one interconnect won't need a temporary variable.
|
||||||
} else if (!alwaysCvt && !forTristate && pinp->exprp()->castConst()) {
|
} else if (!alwaysCvt && !forTristate && pinp->exprp()->castConst()) {
|
||||||
// Done. Constant.
|
// Done. Constant.
|
||||||
|
@ -1097,7 +1097,7 @@ int V3PreProcImp::getStateToken() {
|
|||||||
// Value of building argument is data before the lower defref
|
// Value of building argument is data before the lower defref
|
||||||
// we'll append it when we push the argument.
|
// we'll append it when we push the argument.
|
||||||
break;
|
break;
|
||||||
} else if (tok==VP_SYMBOL || tok==VP_STRING || VP_TEXT || VP_WHITE) {
|
} else if (tok==VP_SYMBOL || tok==VP_STRING || tok==VP_TEXT || tok==VP_WHITE) {
|
||||||
string rtn; rtn.assign(yyourtext(),yyourleng());
|
string rtn; rtn.assign(yyourtext(),yyourleng());
|
||||||
refp->nextarg(refp->nextarg()+rtn);
|
refp->nextarg(refp->nextarg()+rtn);
|
||||||
goto next_tok;
|
goto next_tok;
|
||||||
|
Loading…
Reference in New Issue
Block a user