This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/3779: Accepts illegal C++ code: redefinition of default argument
- To: ljrittle at gcc dot gnu dot org
- Subject: Re: c++/3779: Accepts illegal C++ code: redefinition of default argument
- From: Petter Reinholdtsen <pere at opera dot com>
- Date: Tue, 24 Jul 2001 09:32:02 +0200
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- References: <20010723220343.10177.qmail@sourceware.cygnus.com>
[ljrittle@gcc.gnu.org]
> Before reporting standard compliance issues related to
> gcc please try compiling with -pedantic.
Thank you for getting back to me.
As the code in question is illegal C++, I believe it at least
should give a warning no matter which flags are used. If this
problem is considered to only bother pedantic programmers then
adding -pedantic could turn it into an error.
While I was porting KDE to Irix C++ a few years ago, I discovered
hundreds of these bugs (typical cut-n-paste) in the code, and worked
a week on it before it where even close to compiling. I therefore
believe the programmers using gcc need to at least get a warning
when they write illegal C++ which fails to compile on many compilers.
In short: move the warning from -pedantic to all the time, and make
it possible to force an error for this kind of illegal code.