Bug 108215

Summary: wrong c-code syntax error report
Product: [Applications] kdevelop Reporter: Maciej Witaszek <maciek2w>
Component: Problem reporterAssignee: kdevelop-bugs-null
Status: RESOLVED DUPLICATE    
Severity: normal CC: esigra
Priority: NOR    
Version: 3.2.1   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Maciej Witaszek 2005-06-27 14:41:10 UTC
Version:           3.2.1 (using KDE 3.4.1, PLD Linux Distribution)
Compiler:          gcc version 3.3.5 (PLD Linux)
OS:                Linux (i686) release 2.6.11.5-3

Assume a function definition and declaration in old-style that is used in K&R book:

01   int
02   f1(a, b)
03   int a;
04   int b;
05   {
         /*  ... */
10   }

Kdevelop reports syntax error about lines 03,05 and 10.
Comment 1 Amilcar do Carmo Lucas 2005-06-27 14:49:52 UTC
Why not change it to the "new synthax" :
 01   int 
 02   f1(a, b) 
 03   { 
 04   int a; 
 05   int b; 
          /*  ... */ 
 10   } 
 
It whould make you more standards complient!
Comment 2 Daniel Franke 2005-06-27 14:50:55 UTC
Dupe, see #103655
Comment 3 Maciej Witaszek 2005-06-27 15:00:31 UTC
Amilcar: yes, I know, but I'm porting some old code (it's GNU strace tool). I decided to make as little changes as I can.
Comment 4 Jens Dagerbo 2006-12-19 20:02:42 UTC
Dupe

*** This bug has been marked as a duplicate of 57156 ***