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

ICX compiler providing errors

kishlayc
Beginner
678 Views

Hello,

 

On ICX compiler getting the following while compile the following:

 

/#*#+ string +#/ \

 

 

test.c:10:5: error: pasting formed '/*', an invalid preprocessing token
HINT_PROC(Test);
^
test.c:5:5: note: expanded from macro 'HINT_PROC'
/##*##+ string *##/ \
^
test.c:10:5: error: pasting formed '*+', an invalid preprocessing token
test.c:5:8: note: expanded from macro 'HINT_PROC'
/##*##+ string *##/ \
^
test.c:10:5: error: pasting formed '*/', an invalid preprocessing token
test.c:5:20: note: expanded from macro 'HINT_PROC'
/##*##+ string *##/ \
^
3 errors generated.

----------------------------------------

 

After removing the line , the icx compiler is working fine

 

-On ICC for example getting only warnings:

test.c(10): warning #2358: concatenation with "*+" in macro "HINT_PROC" does not create a valid token
HINT_PROC(Test);
^

test.c(10): warning #2358: concatenation with "+" in macro "HINT_PROC" does not create a valid token
HINT_PROC(Test);
^

test.c(10): warning #2358: concatenation with "/" in macro "HINT_PROC" does not create a valid token
HINT_PROC(Test);
^

----------------------------------------

Any idea how to overcome this error issue? 

 

Code for example is:

 

 

#include<stdio.h>
#include<string.h>

#define HINT_PROC(string)\
/##*##+ string *##/ \

int main()
{
printf("Test\n");
HINT_PROC(Test);
return 0;
}

 

 

compiler version: 2020.1.1.217

ICC : 19.1.1.217 20200306

ICX: 2021.1 Beta 20200304

 

 

Thanks in advance 

0 Kudos
1 Reply
Barbara_P_Intel
Moderator
649 Views

Moving this over to the C++ Forum. They can help you better.

 

0 Kudos
Reply