This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Turning warning "returning reference to temporary" into error?
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 11 May 2003 19:44:43 +0200 (CEST)
- Subject: Turning warning "returning reference to temporary" into error?
Hi!
I'd like to turn the warning "returning reference to temporary", raised in
cp/typecheck.c:maybe_warn_about_returning_address_of_local() (CVS
HEAD) into an error, but
cannot find an option apart from -Werror, which is not applicable here.
Which warning option controls these warnings, I could not find anything in
the manual - can a specific warning turned into an error anyways? I.e.
like -Werror-strict-aliasing or the like?
Wouldnt it be a good idea to at least turn the
maybe_warn_about_returning_address_of_local warnings into an error with
-pedantic? Or always?
Richard.