Bug 3286 - Errors coming from CDTParser on simple file
Summary: Errors coming from CDTParser on simple file
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Rick Moseley
URL:
Keywords:
Depends on:
Blocks: 3392
  Show dependency treegraph
 
Reported: 2006-09-29 14:53 UTC by Rick Moseley
Modified: 2007-11-19 16:34 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Moseley 2006-09-29 14:53:18 UTC
Errors are being generated during a parse via the CDT parser scan of the osurce
code.  Here is the message:

Complete Parse: Error found on line 6
                Char offset of error = 62

This is occuring on the following statement in the file:

pthread_t tester_thread;


Here is the whole file:

#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>


pthread_t tester_thread;

pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;

void do_it()
{
  int t = 34543;
  while (t > 0)
    t--;

  fprintf(stderr,"tester_thread: looping\n");

  while(1);
    
}

void bak()
{
  while(1)
    {
      fprintf(stderr,"main: looping\n");
      while(1);
    }
}

void baz()
{
  int a;
  int b = 0;
  bak();
}

void bar()
{
  close(-1);
  close(-1);
  baz();
  /*Comment */
}

void foo()
{
  bar();
}


int main(char **argv, int argc)
{

  pthread_attr_t attr;
  pthread_attr_init (&attr);
  pthread_create (&tester_thread, &attr, do_it, NULL);

  /* This is a comment */
  foo();
  int t = 30;

  exit(0);
}


The good news is that it does not *seem* to be negatively affecting anything at
the moment.  It is just troubling that this happens on such a small, simple file.
Comment 1 Rick Moseley 2007-11-19 16:34:55 UTC
Apparently fixed.  Cannot reproduce in current checkout from HEAD.