NO

Author Topic: C99 Mode-> switch to C90  (Read 3169 times)

PHANTOMIAS

  • Guest
C99 Mode-> switch to C90
« on: October 29, 2008, 11:14:53 PM »
Hello!

I'm using Pelles C and I found out that the compiler works in C99 mode
("mixed declarations and code", possible to comment with //, create arrays with variable length, ...).

Is it possible to switch to ANSI C - C90 or C95 instead of C99?

Thanks & Regards
   PHANTOMIAS

PHANTOMIAS

  • Guest
Re: C99 Mode-> switch to C90
« Reply #1 on: October 30, 2008, 01:12:07 PM »
Oh, I found an old topic about that:
http://forum.pellesc.de/index.php?topic=1295

-> But it is a "two and a half year old"-topic. Perhaps there is a workaround for this "problem"?
I have to compile with the option -pedantic or -ansic, right?

Thanks & Regards
   PHANTOMIAS

PHANTOMIAS

  • Guest
Re: C99 Mode-> switch to C90
« Reply #2 on: October 30, 2008, 02:24:16 PM »
Quote
I have to compile with the option -pedantic or -ansic, right?
-> Not right  :)
I edited the project file
CCFLAGS =  -Tx86-coff -Zi -Ot -W1 -Gd -Gn #
to
CCFLAGS =  -Tx86-coff -Zi -Ot -W1 -Gd -Gn -ansic#
and alternatively
CCFLAGS =  -Tx86-coff -Zi -Ot -W1 -Gd -Gn -pedantic#

But the compiling failed because these options aren't available (pocc.exe), in LCC there are.

@Pelle: Did you remove the ANSI-C/C89/C90 variants from LCC?
The IDE is used at an university and I don't want to switch it. For the newbies it would be better to learn ANSI C. So, is there any possibility to change this behaviour?

Thanks & Regards
   PHANTOMIAS