Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

icc can't compile memmem

$
0
0

Hi,

When compiling a source file with the use of function memmem (from C standard lib), icc fails and gives such error info:
*****error #140: too many arguments in function call*****

Actually the use of memmem in the code is straightforward and correct. Both gcc and clang can compile it with no problem.

I wrote a piece of sample code:
--------------------------------------------------------
#include
const char *needle = "needle";
const char *hay = "needle in haystack";

int main() {
void *pos = memmem(hay, strlen(hay), needle, strlen(needle));
}
----------------------------------------------------------
You can try it and see if you have same problem.

My specs are:
OS: Linux 2.6.32-358 (x86_64)
icc: 14.0.2
glibc: 2.12

Do you have any ideas about this problem?
Thanks in advance.


Viewing all articles
Browse latest Browse all 1616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>