Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 316309

Summary: [fp] No return, in function returning non-void doesnt work with typedef
Product: [Tools] CDT Reporter: Thomas <terrierberti>
Component: cdt-codanAssignee: Elena Laskavaia <elaskavaia.cdt>
Status: RESOLVED FIXED QA Contact: Elena Laskavaia <elaskavaia.cdt>
Severity: normal    
Priority: P3 CC: cdtdoug, malaperle
Version: 7.0   
Target Milestone: 7.0.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch
elaskavaia.cdt: iplog-
patch to make it work with cpp cdtdoug: iplog+

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.