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]
Other format: [Raw text]

[Bug c++/16506] missing -Wunreachable-code warning from generic code


------- Additional Comments From sebor at roguewave dot com  2004-07-13 01:27 -------
Why? Well, to be useful a warning (or any other diagnostic) needs to be
reliable and predicatble. Even if the maximum number of indirections for
which the compiler is still capable of issuing the warning were known (I
would be surprised if it were), it would not be predictable in user code
in the general case. In gcc 3.5, the latest libstdc++ sources may not
trigger the warning, but that doesn't mean that they won't in the future.
Unless the warning is only to be useful in libstdc++ as it is today (and
not even in all code that uses it since a well-formed program seems to
trigger it even there), I don't think it's very useful at all. I wish
you would reconsider your position. Aligning the warning with, say,
EDG eccp would, IMO, improve the quality of the gcc implementation.

FWIW, I made a similar suggestion to EDG WRT to a (useful) gcc warning
their compiler is lacking. They were quite a bit more receptive to the
idea of adopting useful gcc features than you seem to be to the converse.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16506


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