This is the mail archive of the gcc@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]

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.


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