Since the two are upper case, I expect that they are #defined somewhere and aren't as simple as they appear in your snippet. Try putting each of them in parens too.
As suspected. The compiler thinks you want to or TAL and WARN together. Operator precedence means that you will, but it's warning you that since it did a macro expansion for you, you might want to add brackets to make your intent clearer.
Better to put the brackets in the #define itself in case you've got the same thing elsewhere.
#define TAL (TERM + AL) // print to Terminal and ActionLog
and the "suggestion" is gone!
But what you say the compiler is thinking is exactly what I want: TAL = TERM + AL = 1 + 4 = 5. And TAL | WARN would compare with 69. Or not? Where am I wrong?
It's just a warning, but apparently your setup treats warnings as errors.
It's just trying to tell you that a macro was expanded on this line and that it may not be doing exactly what you expected. In this case, it is doing just what you wanted, but in another situation that might not be true and the compiler can't read your mind.
#define TAL (TERM + AL) // print to Terminal and ActionLog
and the "suggestion" is gone!
But what you say the compiler is thinking is exactly what I want: TAL = TERM + AL = 1 + 4 = 5. And TAL | WARN would compare with 69. Or not? Where am I wrong?
What the compiler actually "sees" is this:
#define TERM 1
#define AL 4 // print to Terminal and ActionLog
#define WARN 64 // NVS storage
#define TAL TERM + AL // print to Terminal and ActionLog
SensorMessage.smtype = (1 + 4 | 64);
In this case, the result will be correct without the parens o nthe definition of TAL, but that will not always be true for other values of the variables, or other expressions.
Bottom line, when creating #defines that contain expressions with ANY operators, the expression in the #define should be fully parenthesized, even if the expression itself does not require it. You have NO idea how that #define will later be used, and in many cases using the #define in another expression can cause evaluation of the #define to occur in the wrong order. Always putting in the parens ENSURES the #define will be evaluated as intended.