mirror of
https://github.com/cc65/cc65.git
synced 2024-07-05 21:29:03 +00:00
When preprocessing, all compares evaluate to constants, so don't print a
warning in this case. git-svn-id: svn://svn.cc65.org/cc65/trunk@4059 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
08d6d96264
commit
c214fa6395
@ -1885,7 +1885,12 @@ static void hie_compare (const GenDesc* Ops, /* List of generators */
|
|||||||
/* Check for const operands */
|
/* Check for const operands */
|
||||||
if (ED_IsConstAbs (Expr) && rconst) {
|
if (ED_IsConstAbs (Expr) && rconst) {
|
||||||
|
|
||||||
|
/* If the result is constant, this is suspicious when not in
|
||||||
|
* preprocessor mode.
|
||||||
|
*/
|
||||||
|
if (!Preprocessing) {
|
||||||
Warning ("Result of comparison is constant");
|
Warning ("Result of comparison is constant");
|
||||||
|
}
|
||||||
|
|
||||||
/* Both operands are constant, remove the generated code */
|
/* Both operands are constant, remove the generated code */
|
||||||
RemoveCode (&Mark1);
|
RemoveCode (&Mark1);
|
||||||
|
Loading…
Reference in New Issue
Block a user