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++/36254] wrong "control reaches end of non-void function" warning



------- Comment #7 from manu at gcc dot gnu dot org  2008-10-22 18:19 -------
The return is generated because we generate one (if there is none) everytime we
reach the end of a function. This is used later to produce "control reaches end
of non-void function". The compiler-generated try-catch forces the creation of
this extra return. The problem is that we do not want to mark all generated
return with no_warning, because we will miss valid warnings. Not sure yet how
to detect which ones were generated because we naturally reach the end of a
function or they are forced because of compiler-generated code.


-- 


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


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