Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Error C2840
Collapse the table of content
Expand the table of content

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;

Community Additions

© 2015 Microsoft