Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316309 - [fp] No return, in function returning non-void doesnt work with typedef
Summary: [fp] No return, in function returning non-void doesnt work with typedef
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 7.0   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: 7.0.1   Edit
Assignee: Elena Laskavaia CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
: 318789 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-09 10:39 EDT by Thomas CLA
Modified: 2014-01-29 22:44 EST (History)
2 users (show)

See Also:


Attachments
patch (1.88 KB, patch)
2010-06-09 21:07 EDT, Elena Laskavaia CLA
elaskavaia.cdt: iplog-
Details | Diff
patch to make it work with cpp (1.85 KB, patch)
2010-07-04 11:57 EDT, Marc-André Laperle CLA
cdtdoug: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas CLA 2010-06-09 10:39:02 EDT
File test.c
-----------

typedef void  VOID;

VOID test(VOID)
{
    int i;

    i = 1;
}


Warning "No return, in function returning non-void" for function test


Defining VOID with "#define VOID  void" is working.
Comment 1 Elena Laskavaia CLA 2010-06-09 21:07:30 EDT
Created attachment 171598 [details]
patch
Comment 2 Elena Laskavaia CLA 2010-06-16 20:27:59 EDT
fixed in 7.0.1 and head
Comment 3 Elena Laskavaia CLA 2010-06-16 20:31:06 EDT
marking it actually fixed
Comment 6 Elena Laskavaia CLA 2010-07-03 19:55:08 EDT
*** Bug 318789 has been marked as a duplicate of this bug. ***
Comment 7 Marc-André Laperle CLA 2010-07-04 11:54:59 EDT
Hi. The bug is still there in C++.
Comment 8 Marc-André Laperle CLA 2010-07-04 11:57:06 EDT
Created attachment 173375 [details]
patch to make it work with cpp
Comment 9 Elena Laskavaia CLA 2010-07-04 21:02:45 EDT
re-open for c++
Comment 10 Elena Laskavaia CLA 2010-07-28 22:05:27 EDT
fixed on trunk and 7.0 branch. Thanks for the patch.