$HINT | $HINTS | $H - Define compiler hints behavior

Language reference ›› Directives ››
Parent Previous Next

hints-directive = ( $HINT | $HINTS | $H ) [ hint-reference ] directive-toggle { "," hint-reference directive-toggle } .
hint-reference = hint-number | hint-identifier .


Define compiler's hints behavior.


NEW! (V2.1): Several hints may be changed in the same directive, separated by commas. Nevertheless a global hints on / off cannot be mixed with individual hint on / off in the same directive.

       

<hint-number>:

Validate or invalidate only the specified compiler hint by its number after this point.


<hint-identifier>:

NEW! (V2.1): Validate or invalidate only the specified compiler hint by its identifier after this point. Not all hints have an equivalent identifier, see below.


<directive-toggle>:

ON / OFF or "+" / "-": if <hint-reference> is omitted, validate or invalidate all the compiler hints after this point of source code, overriding the default option defined in the Project's Options; else validate or invalidate only the <hint-reference> hint.




{$H 2-} // Do not report RMW potential problems
{$HINT UNUSED_SYMBOL OFF} // Do not report unused symbols
{$HINT DEPRECATED OFF, RMW ON}


Hint numbers vs their identifiers vs their text:


1

USER_HINT

User hint

2

RMW

Should use LATx to avoid RMW problem

3

ALWAYS_ZERO

Result is always zero

4

DUP_BIT

Duplicated bit

5

UNUSED_SYMBOL

Symbol %s is declared but never used

6

CANNOT_BE_NEGATIVE

Unsigned terms cannot be negative; sub-expression is always false

7

DEPRECATED

Deprecated: %s