This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: strict_prototypes_lang_c
- To: mark at markmitchell dot com
- Subject: Re: strict_prototypes_lang_c
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Tue, 15 Dec 1998 01:01:32 +0100
- CC: egcs at cygnus dot com
- References: <199812140113.RAA07556@adsl-206-170-148-33.dsl.pacbell.net>
> I think that our default mode should be a *superset* of ANSI/ISO C++
> programs, i.e., ANSI/ISO with some appropriate extensions. Using
> -pedantic should restrict this mode by removing the extensions. Thus,
> -fstrict-prototypes should be the default, as per standard C++. You
> should have to use -fno-strict-prototypes to make `extern "C"' things
> treat `()' as `(...)', IMO.
>
> If we really need to have the default mode be something other than a
> superset of ANSI/ISO C++, then -ansi is the flag that should be used
> to get ANSI/ISO C++ (and maybe some extensions), not -pedantic.
I totally agree on the -ansi/-pedantic issue; it should be -ansi that
activates -fstrict-prototypes, not -pedantic.
I mostly agree on the default value: In C++, () always means (void),
and should not mean (...). I have no idea how many C++ programs still
link with K&R headers; so I'm not sure whether we really should change
the default.
Regards,
Martin