This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: c++/3779: Accepts illegal C++ code: redefinition of default argument


[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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]