Inappropriate Warning Cannot Be Turned Off

Philipp Thomas pthomas@suse.de
Mon Jun 5 16:46:00 GMT 2000


* David Cogen (cogen@ll.mit.edu) [20000605 22:06]:

> Example code fragment, when compiled, produces inappropriate warnings. And
> there is no way to disable these warnings.

>   test.cc:56: warning: choosing `Auto0<int>::operator int &()' over `Auto0<int>::operator const int &() const'
>   test.cc:56: warning:   for conversion from `Auto0<int>' to `int'
>   test.cc:56: warning:   because conversion sequence for the argument is better

I don't know what the ISO C++ standard has to say on this subject and if a
diagnostic is needed, I'll have to leave that to Martin. But IMO these aren't
inappropriate, because they point out possibly unwanted behaviour (Martin?).

I'd agree with you though that there should be a switch to inhibit the
warning (that is, if a diagnostic isn't required).

Philipp

-- 
Philipp Thomas <pthomas@suse.de>
Development, SuSE GmbH, Schanzaecker Str. 10, D-90443 Nuremberg, Germany

#define NINODE  50              /* number of in core inodes */
#define NPROC   30              /* max number of processes */
 	-- Version 7 UNIX fuer PDP 11, /usr/include/sys/param.h


More information about the Gcc-bugs mailing list