Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

icc can't compile memmem

Lei_Z_
Beginner
432 Views
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.
0 Kudos
1 Reply
KitturGanesh
Employee
432 Views

Hi,
I could reproduce the problem and have filed the issue with the developers and will get back to you as soon as I've an update. Appreciate your patience till then.
_Kittur

0 Kudos
Reply