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.
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.
Created attachment 66631 [details] tarball of a cnd project
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); }
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.
I'm changing the summary, since (1) is just a duplicate of #139600.
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