Pelles C forum

Pelles C => General discussions => Topic started by: SoBigBoy on February 13, 2014, 10:16:32 AM

Title: What Version? What Standard?
Post by: SoBigBoy 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.
Title: Re: What Version? What Standard?
Post by: frankie 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.
Title: Re: What Version? What Standard?
Post by: SoBigBoy 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.
Title: Re: What Version? What Standard?
Post by: TimoVJL on February 13, 2014, 06:03:58 PM
PellesC's compilers are C99 from start version 2.50
C11 support comes in version 7
Title: Re: What Version? What Standard?
Post by: Bitbeisser on February 13, 2014, 11:06:23 PM
Quote from: SoBigBoy 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.
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
Title: Re: What Version? What Standard?
Post by: SoBigBoy on February 14, 2014, 05:16:49 AM
Quote from: timovjl on February 13, 2014, 06:03:58 PM
PellesC's compilers are C99 from start version 2.50
C11 support comes in version 7

Thanks, timovjl!
:)