Export (0) Print
Expand All

Compiler Error C2840

instruction word argument not constant

An invalid parameter was passed to an __lfetch intrinsic. For more information, see __lfetch, __lfetch_excl, __lfetchfault, __lfetchfault_excl.

The following sample generates C2840.

// C2840.cpp
// compile with: /c
// processor: IPF
#include <intrin.h>
#pragma intrinsic(__lfetch)
int f(int *p, int x) {
   __lfetch(x, p);   // C2840
   __lfetch(0, p);   // OK
   return *p;
}
Show:
© 2014 Microsoft