- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Moving this over to the C++ Forum. They can help you better.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page