This documentation is archived and is not being maintained.

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;