Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
13 Views

warning #996: value of immediate argument to intrinsic is out of range

Jump to solution

Hello,

What does this message, obtained when compiling with /Qopt-report:3, signify. It occurs wherever my code has the line:

n = n << 8;

...where n is a 32-bit integer with zeros in its eight most significant bits?

Thanks,
Stephen.

0 Kudos

Accepted Solutions
Highlighted
Employee
13 Views
We can compile the following code segment without any issue:

c:\>type tstcase.cpp

int main()

{

int n[100];

int i;

for (i =0; i< 100; ++i)

n = i+1;

for (i =0; i< 100; ++i)

n = n << 8;

return 0;

}

c:\>icl /Qopt-report:3 tstcase.cpp

C:\>icl -V

Intel C++ Compiler XE for applications running on IA-32, Version 12.0.2.154 Build 20110112

Copyright (C) 1985-2011 Intel Corporation. All rights reserved.

View solution in original post

0 Kudos
2 Replies
Highlighted
Employee
14 Views
We can compile the following code segment without any issue:

c:\>type tstcase.cpp

int main()

{

int n[100];

int i;

for (i =0; i< 100; ++i)

n = i+1;

for (i =0; i< 100; ++i)

n = n << 8;

return 0;

}

c:\>icl /Qopt-report:3 tstcase.cpp

C:\>icl -V

Intel C++ Compiler XE for applications running on IA-32, Version 12.0.2.154 Build 20110112

Copyright (C) 1985-2011 Intel Corporation. All rights reserved.

View solution in original post

0 Kudos
Highlighted
Beginner
13 Views
Ah, my silly fault... I had ARGB defined as an array of unsigned chars, and had forgotten to cast each block of four into an int32 before applying the shifts.

Thank you.
0 Kudos