- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have:
#define pp_il_element(...) (1, __VA_ARGS__ pp_empty)()
I want
pp_il_element()
expand to
(1, pp_empty)()
but icc 110 expand it to
(1 pp_empty)()
There is a comma lost.
I tested this on gcc, gcc expands this to
(1, pp_empty)()
gcc is ok.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - churunmin
I have:
#define pp_il_element(...) (1, __VA_ARGS__ pp_empty)()
I want
pp_il_element()
expand to
(1, pp_empty)()
but icc 110 expand it to
(1 pp_empty)()
There is a comma lost.
I tested this on gcc, gcc expands this to
(1, pp_empty)()
gcc is ok.
I am investigating this issue. Could you provide code segment that compiles with gcc?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On Windows, both icl and cl expands to the same "(1 pp_empty)" with following define.
But on Linux, icc 11.0.081 expands just like gcc.
Here is the t.c I used:
But on Linux, icc 11.0.081 expands just like gcc.
Here is the t.c I used:
#define pp_il_element(...) (1, __VA_ARGS__ pp_empty)
typedef enum { pp_empty, pp_empty1, pp_empty2} SEnumT;
int foo(int a, SEnumT b)
{
return a+b;
}
int main(int argc, char* argv[])
{
foo pp_il_element();
return 0;
}
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page