"Emanuele Blanco" <ma***@despammed.com> wrote:
Hi there,
don't know if it's the right group, but I'll try anyway. Sorry if I'm OT,
anybody can be so patient to tell me the right group ? Thanks :)
Anyway, the question is:
I know I can write C programs using a C++ environment like Dev-C++. However,
I'd like to know if there are some options that allow Dev to ignore C++
syntax and act as a C-only compiler. Is this possible ?
<OT>
Since Dev-C++ is in fact an IDE that comes with the MingW port of gcc,
the answer is, of course, yes. Name your files <name>.c and add the
following options to the compiler command line in order to invoke gcc
in C89 conforming mode:
-W -Wall -O<n> -std=c89 -pedantic
Notes:
1. replace <n> with a number in [1;3], or s
2. -std=c89 replaces the deprecated -ansi option
3. -std=c99 is possible too, but several C99 features have not
been implemented in gcc yet
</OT>
Please direct further implementation specific questions to either
gnu.gcc.help or the online forum at
http://www.bloodshed.net/forum .
For standard C language questions comp.lang.c is however /the/ place
to ask, just be sure to read the FAQ and welcome message (links
provided in signature) and lurk for a while before posting.
HTH, good luck
Regards
--
Irrwahn Grausewitz (ir*******@freenet.de)
welcome to clc:
http://www.ungerhu.com/jxh/clc.welcome.txt
clc faq-list :
http://www.faqs.org/faqs/C-faq/faq/
clc OT guide :
http://benpfaff.org/writings/clc/off-topic.html