Compiler incorrectly issues diagnostic 980: wrong number of actual arguments to intrinsic function

Reference Number : DPD200036884

Version : 11.0.081

Operating System : Linux

Problem Description : When you derive a class from std::ofstream or use various STL functions such as std::cin.get(),  std::cingetline(), etc., the compiler will issue the following warning:

Warning 980: Wrong number of actual arguments to intrinsic function

This diagnostic is supposed to indicate that you are calling an intrinsic function with the wrong number of arguments, but unfortunately currently it gives false warnings for overloaded functions that are only represented in the intrinsic table in the compiler with a single overload.  Intrinsics are compiler provided assembly-coded functions that allow you to use C++ function calls and variables in place of assembly instructions. They are expanded inline eliminating function call overhead to improve performance. For more information on intrinsic functions please refer to the Intel® C++ Compiler User's Guide. 


#include <iostream>
using namespace std;

int main() {
char str[40];
return 0;

$ icpc -c -V test.cpp
Intel® C++ Compiler Professional for applications running on IA-32, Version 11.0    Build 20090131 Package ID: l_cproc_p_11.0.081
Copyright (C) 1985-2009 Intel Corporation.  All rights reserved.

test.cpp(6) (col. 9): warning #980: wrong number of actual arguments to intrinsic function "std::basic_istream::getline"

Resolution Status : This issue has been resolved in the Intel® C++ Compiler Version 11.0 with Build Date 3/14/2009 or higher.
This warning is not harmful.  It just means that the version of the overloaded function that you are using will be a library call instead of an intrinsic.

You can turn off the diagnostic completely using command line options or turn off recognition of a particular intrinsic using the -fno-builtin compiler option as shown below:

// Turn off the warning using the "-diag-disable" compiler option
$ icpc -c -diag-disable 980 test.cpp
// Turn off the warning by disabling the recognition of compiler intrinsic                    
$ icpc -c -fno-builtin-std::basic_istream::getline test.cpp

[DISCLAIMER: The information on this web site is intended for hardware system manufacturers and software developers. Intel does not warrant the accuracy, completeness or utility of any information on this site. Intel may make changes to the information or the site at any time without notice. Intel makes no commitment to update the information at this site. ALL INFORMATION PROVIDED ON THIS WEBSITE IS PROVIDED "as is" without any express, implied, or statutory warranty of any kind including but not limited to warranties of merchantability, non-infringement of intellectual property, or fitness for any particular purpose. Independent companies manufacture the third-party products that are mentioned on this site. Intel is not responsible for the quality or performance of third-party products and makes no representation or warranty regarding such products. The third-party supplier remains solely responsible for the design, manufacture, sale and functionality of its products. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. *Other names and brands may be claimed as the property of others.]
For more complete information about compiler optimizations, see our Optimization Notice.