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 142979 - For C files, in the case of undeclared function calls, change error message to warning
Summary: For C files, in the case of undeclared function calls, change error message t...
Status: RESOLVED WONTFIX
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: Leonid Lenyashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-05 23:54 UTC by _ gordonp
Modified: 2009-12-21 06:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
tarball of a cnd project (15.96 KB, text/plain)
2008-08-05 23:55 UTC, _ gordonp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gordonp 2008-08-05 23:54:07 UTC
I'm seeing some highlighting syntax errors (both Windows and Solaris) for a fairly simple
test app I'm using. I'm running a private up-to-date build while seeing them.
Comment 1 _ gordonp 2008-08-05 23:55:08 UTC
Created attachment 66631 [details]
tarball of a cnd project
Comment 2 Vladimir Kvashin 2008-08-06 06:53:38 UTC
Here is the code from the example.
The issues are as follows:
1) In the declaration of the squaref pointer, squaref is highlighted. This is due to #139600
2) exit() usages are highlighted
3) sleep() usages are highlighted


#include <stdio.h>
#include <dlfcn.h>

int main(int argc, char **argv) {
	void *handle;
        int i = 1;
/*	double (*cosine)(double); */
	int (*squaref)(int);
	const char *error;
/*	handle = dlopen ("/lib/libm.so.5", RTLD_LAZY); */
	handle = dlopen ("/home/gordonp/NetBeansProjects/DlopenTest_1/shared/dist/Debug/GNU-Solaris-x86/libshared.so", RTLD_LAZY);
	if (!handle) {
		fputs (dlerror(), stderr);
		exit(1);
	}

	squaref = dlsym(handle, "square");
	if ((error = dlerror()) != NULL)  {
		fputs(error, stderr);
		exit(1);
	}

        while (i > 0) {
            printf("Try %d\n", i++);
            printf("    %d\n", (*squaref)(1));
            printf("    %d\n", (*squaref)(2));
            printf("    %d\n", (*squaref)(3));
            sleep(5);
        }
	dlclose(handle);
}
Comment 3 Vladimir Kvashin 2008-08-06 07:24:26 UTC
The issue (1) is described in #139600

As to (2) and (3), the file in the example really does *not* include necessary headers.
Try preprocessing in with -E option and you'll see that neither exit nor sleep are declared.

GNU C compiler silently compiles such code.
Sun C compiler compiles it, but issues warnings.

So the solution for this issue is as follows:
for C files, in the case of undeclared function calls, change error message to warning.
Comment 4 Vladimir Kvashin 2008-08-06 07:31:32 UTC
I'm changing the summary, since (1) is just a duplicate of #139600.
Comment 5 Quality Engineering 2009-12-21 06:56:51 UTC
This bug was reported against NetBeans IDE 6.0 or an older release, or against a non-maintained module. NetBeans team does not have enough resources to get to this issue, therefore we are closing the issue as a WONTFIX. If you are interested in providing a patch for this bug, please see our NetFIX guidelines for how to proceed. 

We apologize for any inconvenience.


Thank you.
The NetBeans Team