NO

Author Topic: What Version? What Standard?  (Read 3573 times)

SoBigBoy

  • Guest
What Version? What Standard?
« on: February 13, 2014, 10:16:32 AM »
I work with legacy C code.  Some code was compiled under K&R (the pre-ANSI C standard), and some was compiled under the ANSI C standard.  My contract requires that I continue to compile the code using the standard that was used when the code was originally developed.

The newest version of Pelles C has only C99 and C11 support.  It no longer supports K&R or ANSI.  What is the latest version of Pelles C that has the option for compiling both K&R and ANSI?  (I prefer not to install 2 separate versions of Pelles C, if possible.)  I looked at the download page, and it doesn't say what standards a version supports.
:(

Thanks.

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: What Version? What Standard?
« Reply #1 on: February 13, 2014, 11:18:48 AM »
All versions of PellesC still support original K&R syntax as far as I know, only they just issues warnings for old constructs.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

SoBigBoy

  • Guest
Re: What Version? What Standard?
« Reply #2 on: February 13, 2014, 05:12:00 PM »
I'm sorry if I did not make myself very clear.

I realize that all versions may support K&R.  But with the latest version of Pelles, you have to select C99 or C11--which I don't want.  There is no option to select only K&R or ANSI.

I believe in earlier version of Pelles before C11 and C99 existed, you could select K&R or ANSI.  I'm asking what version of Pelles has this option.

Thanks.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2116
Re: What Version? What Standard?
« Reply #3 on: February 13, 2014, 06:03:58 PM »
PellesC's compilers are C99 from start version 2.50
C11 support comes in version 7
May the source be with you

Offline Bitbeisser

  • Global Moderator
  • Member
  • *****
  • Posts: 772
Re: What Version? What Standard?
« Reply #4 on: February 13, 2014, 11:06:23 PM »
I'm sorry if I did not make myself very clear.

I realize that all versions may support K&R.  But with the latest version of Pelles, you have to select C99 or C11--which I don't want.  There is no option to select only K&R or ANSI.

I believe in earlier version of Pelles before C11 and C99 existed, you could select K&R or ANSI.  I'm asking what version of Pelles has this option.
 
Thanks.
Pelle's C, in it's latest version will compile ANSI C just fine, after all, C99/C11 are just that, different, newer variations of the standard set by ANSI (with the first official one being referred to as C89).

K&R is a complete different issue all together. considering that ANSI C is out for more than 25 years as a standard, it is outright stupid if not borderline criminal to insist on maintaining K&R style code.

But then most of those warnings you will get with K&R style code are just that warnings, which you can turn off with an appropriate pragma directive...

Ralf

SoBigBoy

  • Guest
Re: What Version? What Standard?
« Reply #5 on: February 14, 2014, 05:16:49 AM »
PellesC's compilers are C99 from start version 2.50
C11 support comes in version 7

Thanks, timovjl!
 :)