Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337677 - Warning about "void" in late-specified return type
Summary: Warning about "void" in late-specified return type
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Marc-André Laperle CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-20 20:57 EST by Nathan Ridge CLA
Modified: 2011-03-11 01:23 EST (History)
2 users (show)

See Also:


Attachments
ReturnChecker Late-Specified void return patch (5.24 KB, patch)
2011-02-21 04:06 EST, Marc-André Laperle CLA
no flags Details | Diff
ReturnChecker Late-Specified void return patch (4.97 KB, patch)
2011-03-02 21:34 EST, Marc-André Laperle CLA
malaperle: iplog-
malaperle: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Ridge CLA 2011-02-20 20:57:04 EST
When a "void" return type is specified using the C++0x late-specified return type, CDT gives a warning:

auto f() -> void  // WARNING: No return, in function returning non-void
{
}

Since this code is equivalent to

void f()
{
}

there should be no warning.
Comment 1 Marc-André Laperle CLA 2011-02-21 04:06:33 EST
Created attachment 189396 [details]
ReturnChecker Late-Specified void return patch

Patch + tests
Comment 2 Marc-André Laperle CLA 2011-03-02 21:34:08 EST
Created attachment 190225 [details]
ReturnChecker Late-Specified void return patch

Updated patch against HEAD.
Comment 3 Marc-André Laperle CLA 2011-03-08 01:48:07 EST
Comment on attachment 190225 [details]
ReturnChecker Late-Specified void return patch

Alena, does this patch look good to you?
Comment 4 Marc-André Laperle CLA 2011-03-11 00:30:49 EST
Fixed in HEAD.