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] | |
Hi All, The following was 'recently' committed....2002-12-17 Jason Merrill <jason@redhat.com> * decl.c (finish_function): Also complain about no return in templates. * semantics.c (finish_return_stmt): Also call check_return_expr in templates. * typeck.c (check_return_expr): In a template, just remember that we saw a return.Which in itself is probably a good change, but I've just noticed (from the Apache Xalan library), that it causes a warning in the following case...
I meant to comment on this patch when I saw it go by -- I think it's a mistake. I think it makes little sense to warn about much of anything in templates due to problems like these; at the very least, we should only be warning when the return type is non-dependent. -- Mark Mitchell mark@codesourcery.com CodeSourcery, LLC http://www.codesourcery.com
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |