LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

subtracting two __int64 values

I'm getting a general protection fault when I subtract two __int64 values.
 
Seems to me like this should never happen, no matter what the content of the two values.
 
Has anyone been through this before?
 
Menchar
0 Kudos
Message 1 of 5
(4,035 Views)
Any arithmetic expression with __int64 types seems to compile and build without error, then fault when executed.
 
No difference if I do the expression using  LARGE_INTEGER QuadPart, which is a LONGLONG or __int64 data type.
 
Does anyone know where the __int64 support in CVI is described or documented?
 
All I can get to work is declarations, simple assignment (no arithmetic operators involved), and printing using I64 format descriptor.
 
C99 requires long long integer data type as 64 bit, and full arithmetic support. 
 
Menchar
 
 
0 Kudos
Message 2 of 5
(4,025 Views)

I'm using CVI 7.0, and have had no problem using __int64 variables in all kinds of situations, including arithmetic, logical, parameter passing to functions and return values from them. Works for me exactly how I expect it to.

Not much help to you, I suppose...

JR

0 Kudos
Message 3 of 5
(4,020 Views)

There's a compiler error in CVI standard C compiler.   It looks like it's been there since NI added __int64 support.

If an __int64 variable is of static storage class, and if it appears on the right hand side of an arithmetic expression, a general protection fault occurs.

NI agrees that this is a compiler problem.

I've started another thread on this.

 

0 Kudos
Message 4 of 5
(3,985 Views)
Indeed we will investigate.  The link to the other thread is here if you are interested in seeing the exact use case I sent to R&D.

thanks,
Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 5 of 5
(3,961 Views)