- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have an old C program I need to compile. It's been written in the old style C from the original Kernighan and Ritchie standard:
myfunc(a,b)
int a, b;
{
/* code */
}
I have been asked to use icpc. I have installed the latest version of icpc available for download today (10/26/2021). It's not surprising that I'm getting lots of errors.
Is there a compiler flag for icpc that will allow me to compile this old program?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
>>>Is there a compiler flag for icpc that will allow me to compile this old program?
Sorry for the inconvenience. Unfortunately, there is no compiler flag for icpc that will allow you to compile the old C Program.
Thanks & Regards
Shivani
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reaching out to us.
Thanks for reporting. We are able to reproduce the issue . We are working on it and will get back to you soon.
Thanks & Regards
Shivani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use icc instead of icpc on C file.
$ cat t2.c
#include<stdio.h>
int myfunc();
int myfunc(a,b)
int a,b;
{
int c;
c =a+b;
return c;
}
$ icc t2.c -c
$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks to Shivani and Viet. We have some company requirements on icpc, and I will wait for Shivani to determine whether there's a compiler flag that can be set to avoid having to use a different compiler or worse, rewriting that code!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AFAIK, there isn't an option so that icpc will accept the code. g++ won't compile it neither.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
>>>Is there a compiler flag for icpc that will allow me to compile this old program?
Sorry for the inconvenience. Unfortunately, there is no compiler flag for icpc that will allow you to compile the old C Program.
Thanks & Regards
Shivani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for accepting our solution. If you need any additional information please post a new question as this thread will no longer be monitored by intel.
Thanks & Regards
Shivani
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page