Turning warning "returning reference to temporary" into error?
Richard Guenther
rguenth@tat.physik.uni-tuebingen.de
Sun May 11 17:45:00 GMT 2003
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.
More information about the Gcc
mailing list