This is the mail archive of the gcc-patches@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, Could someone review and this? This patch adds a new warning options -Wignored-return-type-qualifiers that checks for useless type qualifiers for scalar and void return types. Currently this is included in -Wreturn-type, which also checks for other conditions involving return types. The reason why we want this to be a separate warning is that it is a very common error for C++ programmers to write code like const int foo(....) The const is nonsensical but it is also harmless. It would not nice to be able to turn off this particular kind warning but still check for other kind of return type issues. -Doug
Attachment:
patch.txt
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |