This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12963] Wrong and misleading warning encourages writing non-portable code
- From: "abramobagnara at tin dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Sep 2004 07:24:41 -0000
- Subject: [Bug c++/12963] Wrong and misleading warning encourages writing non-portable code
- References: <20031108134219.12963.bagnara@cs.unipr.it>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From abramobagnara at tin dot it 2004-09-21 07:24 -------
(In reply to comment #1)
> The warning is correct for this implementation and since you are compiling
with this
> implementation, you can recieve warnings (yes it would be better if it was
enabled by a -
> W* but I think it is good warning no matter what). To disable the warning use
-w (notice
> the lower case w).
I hope that there is a general consensus about the fact that the presence of
expected warnings not avoidable on compilation log is a bad thing.
This lower the attention threshold of programmers and contributors about true
problems and reduce the readability of compilation log. I suppose that the
availability of -Werror is derived from this same reasoning.
Taken for granted that, I think that the presence of warning options like
-wWARNING-NAME to disable specific warnings could solve the problem in a per
file fashion.
Better than that the availability of something like
#pragma expected-warning line WARNING-NAME
might remove the warning generated by the following line labeling it as checked,
expected and/or unavoidable.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12963