次の方法で共有


Compiler Warning (Level 2) C4720 (Windows Embedded CE 6.0)

1/5/2010

in-line assembler reports: 'message'

This SH-specific warning applies to multiple situations that might occur for SH inline assembly.

This warning is not visible when compiling with the -GL Whole Program Optimization option.

In the following example code, the compiler issues this warning to indicate a branch in a delay slot.

Example

/* C4720.c */
#ifdef __cplusplus
extern "C" void __asm(const char *, ...);
#else
extern void __asm(const char *,...);
#endif

int main() 
{
   int ValA = 10;
   int ValB = 0;
   __asm(
      "mov.l @r4, r2\n"
      "mov #0, r6\n"
      "add r2, r6\n"
      "bf/s lala\n"
      "bf la\n"
      "lala: add r2, r6\n"
      "la: mov.l r6, @r5\n", 
      &ValA,&ValB);     /* delay slot branch */
   return 0;
}

See Also

Reference

Device Compiler Error Messages