1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-26 05:29:30 +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:
uz 2009-08-27 22:09:46 +00:00
parent 08d6d96264
commit c214fa6395

View File

@ -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);