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++/12963] Wrong and misleading warning encourages writing non-portable code


------- Additional Comments From jsm at polyomino dot org dot uk  2004-09-22 22:24 -------
Subject: Re:  Wrong and misleading warning encourages writing
 non-portable code

On Tue, 21 Sep 2004, abramobagnara at tin dot it wrote:

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

That this is desired is generally agreed.  It's just that no-one has yet 
produced a design for it and still had time left to implement it after all 
the arguing over that design.

DJ produced a design <http://gcc.gnu.org/ml/gcc/2004-06/msg01188.html> 
(and thread).  This led to a mechanical patch adding a parameter 0 to 
every call to warning() 
<http://gcc.gnu.org/ml/gcc-patches/2004-07/msg02229.html>; it wasn't 
applied, nor was there any followup.  Previously, Stan Shebs gave a 
proposal <http://gcc.gnu.org/ml/gcc/2003-01/msg01065.html> (and thread).  
There have been various other such discussions.  
<http://gcc.gnu.org/ml/gcc/2000-06/msg00639.html> has a different 
proposal.  <http://gcc.gnu.org/ml/gcc/1998-09/msg00353.html> included, I 
think uniquely, a patch, but there were objections and it was reverted 
within 24 hours.

Implementing such a feature is not hard.  I could probably do a plausible 
implementation - that did not require all calls to diagnostic functions to 
be converted at once, rather allowing the conversion to having individual 
warnings controllable to be a gradual one - in a few days (having 
enable-mapped-location unconditionally on would help though), as could 
many other people.  Producing a consensus that any given approach is 
right, or even that any given approach is not unacceptable, is the hard 
part.



-- 


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


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