This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: a barely useful option?
- To: Igor Markov <imarkov@cs.ucla.edu>, gcc@gcc.gnu.org
- Subject: Re: a barely useful option?
- From: Dietmar Kuehl <dietmar.kuehl@claas-solutions.de>
- Date: Sun, 08 Aug 1999 16:16:47 +0200
Hi,
At 16:46 07.08.99 -0700, Igor Markov wrote:
>
> g++ -Weffc++ test.cxx
> gives a ton of warnings when compiling
>
>#include <iostream.h>
>int main() {}
>
> which seemingly makes -Weffc++ unuseful (I also tried <iostream>).
With a reasonably implemented standard library this options is quite
useful! My implementation of the IOStream library currently issues only
warnings if deprecated library features are used even with maximum warning
level (-W -Wall -Weffc++ -ansi -pedantic). There are a bunch of iterator
classes which, when implemented according to the standard, issue a warning
for operator++(int) (eg. ostreambuf_iterator) but I thought about submitting
a patch to avoid this warning for these classes. If you want to have a look
at this implementation, you can get a working version from
<http://www.claas-solutions.de/iostreams/lib/libstdcxx-0.0.tar.gz> (currenty
I'm preparing a complete release which will involve a name change to avoid
confusing this library with libstdc++).
> Given the multitude of g++ options that are documented not to be very
> useful, I am not sure whether it's the option that can be removed or
> the stdlibc++ fixed according to Scott Meyers' Effective C++ books.
I think the library should be fixed. In any case, even if the library is
not fixed, the warning should not be removed: There will be a library which
will not cause any warnings and especially new users of C++ will benefit
from this warning.
Regards,
Dietmar