Mail Archives: djgpp-workers/1999/10/11/16:18:05
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
- Raw text -