This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 237884 - "Assign Return Value To New Variable" hint and C struct
Summary: "Assign Return Value To New Variable" hint and C struct
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: PC All
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-01 11:50 UTC by soldatov
Modified: 2013-11-13 08:25 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2013-11-01 11:50:02 UTC
C code:

struct S {
    int x;
    int y;
} s1;

struct S* getStruct(struct S* s) {
    return s;
}

int main(int argc, char** argv) {
    getStruct(&s1);
    return (0);
}

Scenario:
- Move cursor on getStruct(&s1)
==> "Assign Return Value To New Variable" hint appears
- Click on hing and press ENTER
==> IDE replaces "getStruct(&s1);" on "S* Struct = getStruct(&s1);"
- Build project
==>
cc   -c -g -o build/Debug/OracleSolarisStudio-Solaris-x86/newmain.o newmain.c
"newmain.c", line 12: undefined symbol: S
"newmain.c", line 12: undefined symbol: Struct
"newmain.c", line 12: syntax error before or at: =

Expected line: struct S* Struct = getStruct(&s1);
Comment 1 Alexander Simon 2013-11-05 11:19:19 UTC
fixed, change set:
a6e61f2c6b47
Comment 2 Quality Engineering 2013-11-11 20:14:25 UTC
Integrated into 'releases/release74', will be available in build *201311111738* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/8f92acf6f0bf
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #237884 "Assign Return Value To New Variable" hint and C struct
(transplanted from a6e61f2c6b4727eee59afa829af944c1e44b7e5a)
Comment 3 soldatov 2013-11-12 08:59:49 UTC
verified in NetBeans IDE 7.4 (Build 201311111738)