This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can I suppress this warning?

In my code I use the nop instruction (for short delay). The compiler warns me:

warning: #174-D: expression has no effect

How can I suppress this warning?

Parents Reply Children
  • Exactly. Note that when you inline assembler, then the compiler will run the code optimizer over your assembler instructions too. And the compiler see no use for any nop instructions. They are just good-for-nothing no-operations that should be removed - they are as meaningful as an assign a=a.

    With the intrinsic, the compiler will be much nicer and caring about your NOP instructions, making it realize that you explicitly want the time delay side effect, and at that specific position in the code.