Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Compiler Error C2840

Error Message

instruction word argument not constant

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

Example

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;
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.