Indigo indexer shows bugs, Helios just ignores [message #722308] |
Mon, 05 September 2011 06:35 |
Eclipse User |
|
|
|
I'm trying to use a particular structure from <time.h> itimerspec, for use with the timerfd library.
The structure is defined in <timer.h>:
struct itimerspec
{
struct timespec it_interval;
struct timespec it_value;
};
However, when I try to use it in a test program like this, Helios shows red bugs in the left sidebar, with the notification "Field 'tv_sec' could not be resolved"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(void) {
struct timespec timer;
timer.tv_sec=1;
timer.tv_nsec=123456789;
printf("timer = %i.%9li\n", (int) timer.tv_sec, timer.tv_nsec);
nanosleep(&timer, NULL);
struct itimerspec itimer;
itimer.it_value.tv_sec=1;
itimer.it_value.tv_nsec=123456789;
printf("itimer.itvalue = %i.%9li\n", (int) itimer.it_value.tv_sec, itimer.it_value.tv_nsec);
return EXIT_SUCCESS;
}
These 'bugs' also show up in the "Problems" view. "Problem Details" adds 'Name resolution problem found by indexer'.
Content completion within the editor also fails for the structure itimer: when I enter 'itimer.' in the editor, the popup shows 'itimerspec:?'.
Interestingly, the program compiles without any complaints from gcc.
When I open the included <time.h> header, the Outline view shows the structure itimerspec, but grayed out. Same for the structure timespec but that doesn't seem to have the same indexing problems.
I can reproduce the problem with autocompletion in Helios (Eclipse 3.6) but in that case, the 'bugs' are not flagged - just ignored.
The indexer logs the problem in .metadata/.log:
!ENTRY org.eclipse.cdt.core 1 0 2011-09-05 12:32:41.625
!MESSAGE Indexed 'test_posix' (1 sources, 44 headers) in 0.25 sec: 1,417 declarations; 1,636 references; 3 unresolved inclusions; 0 syntax errors; 12 unresolved names (0.39%)
Any suggestions?
|
|
|
Powered by
FUDForum. Page generated in 0.04116 seconds