[Bug 60512] New: Syntax parser can be fooled by #defines

Jon Smirl jonsmirl at yahoo.com
Mon Jun 30 07:08:05 UTC 2003


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
     
http://bugs.kde.org/show_bug.cgi?id=60512     
           Summary: Syntax parser can be fooled by #defines
           Product: kdevelop
           Version: CVS
          Platform: RedHat RPMs
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kdevelop-devel at kdevelop.org
        ReportedBy: jonsmirl at yahoo.com


Version:           CVS (using KDE KDE 3.1)
Installed from:    RedHat RPMs

Editor flags a syntax error on 'foreach_s' in C code. List macros like this are all over the kernel source.

#define foreach_s(ptr, t, list)   \
        for(ptr=(list)->next,t=(ptr)->next; list != ptr; ptr=t, t=(t)->next)


static void free_funcs( struct dynfn *l )
{
   struct dynfn *f, *tmp;
   foreach_s (f, tmp, l) {
      remove_from_list( f );
      ALIGN_FREE( f->code );
      FREE( f );
   }
}




More information about the KDevelop-devel mailing list