Compiler Error C2840
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

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;
© 2015 Microsoft