From: pavenis AT lanet DOT lv Message-ID: To: Eli Zaretskii , djgpp-workers AT delorie DOT com Date: Mon, 11 Oct 1999 20:43:35 +0300 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: xmalloc and xfree References: In-reply-to: X-mailer: Pegasus Mail for Win32 (v3.12a) Reply-To: djgpp-workers AT delorie DOT com On 11 Oct 99, at 19:02, Eli Zaretskii wrote: > > On Mon, 11 Oct 1999 pavenis AT lanet DOT lv wrote: > > > If You specify -ansi then -D__STRICT_ANSI__ is added to command > > line of cpp > > Is -ansi used by default by the C++ compiler in v2.95.1? I understood > previously that it was, but perhaps I misunderstood you, or confused > -ansi with some other similar option. No it's not used by default. > > > If You specify -fpedantic or -fpedantic-errors it's not added. > > So what is the switch that triggers errors in C++ for functions without > prototypes? Is it -fpedantic-errors or something else? > C++ compiler silently defaults to -fpedantic-errors unless one (or both) of -fpedantic or -fpermissive is specified. It's in gcc/cp/decl.c (procedure init_decl_processing()): if (! flag_permissive && ! pedantic) flag_pedantic_errors = 1; Non zero value of flag_fpedantic_errors tells compiler to generate errors on violations of standard. Andris