mirror of
https://github.com/cc65/cc65.git
synced 2025-02-04 13:32:54 +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
@ -1884,8 +1884,13 @@ static void hie_compare (const GenDesc* Ops, /* List of generators */
|
||||
|
||||
/* Check for const operands */
|
||||
if (ED_IsConstAbs (Expr) && rconst) {
|
||||
|
||||
Warning ("Result of comparison is constant");
|
||||
|
||||
/* If the result is constant, this is suspicious when not in
|
||||
* preprocessor mode.
|
||||
*/
|
||||
if (!Preprocessing) {
|
||||
Warning ("Result of comparison is constant");
|
||||
}
|
||||
|
||||
/* Both operands are constant, remove the generated code */
|
||||
RemoveCode (&Mark1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user