| Subject: | Re: How do I get a warning or error when returning values from functions returning void in GCC? |
|---|---|
| From: | bgutter <bgutter1@xxxxxxxxx> |
| Date: | Sun, 27 Jul 2008 19:19:34 -0700 (PDT) |
| Newsgroups: | gnu.gcc.help |
Thanks Thomas. I understand the reasoning now for variant return types on templated functions. Makes perfect sense there. However, for the case I described where templates are not involved, I believe GCC should emit a warning (that I can turn into an error with - Werror), and/or disable with some -Wno-xxx type of option if I don't care to see it. When templates are not involved, it is usually indicates a coding error to return a non-void "value" from a plain non- template function returning void. But I guess this has been in GCC for a while now, so I bet there is little chance it will get changed now. Thanks Bgutter |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | inconsistent macro behavior, RezaRob |
|---|---|
| Next by Date: | Re: Is this code in gcc 4.3.1 valid C or is Sun compiler wrong ??, David Eisner |
| Previous by Thread: | Re: How do I get a warning or error when returning values from functions returning void in GCC?, Thomas Maeder |
| Next by Thread: | Retrieving function declarations, Ara . Avanesyan |
| Indexes: | [Date] [Thread] [Top] [All Lists] |