bug-indent
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-indent] GNU Indent 2.2.6 Behavior


From: Jagmeet Singh Hanspal
Subject: [Bug-indent] GNU Indent 2.2.6 Behavior
Date: Tue, 2 Aug 2005 10:40:14 +0530

Hi,

This is regarding GNU Indent version 2.2.6
I am observing the following behavior when I run "Indent" with the "-kr" switch.
Example Source Code:

      Input Output (Command: indent -kr ) 
      typedef struct 
      { 
        int a; 
        char b; 
        int c[sizeof(int)]; 
      } structure_one; typedef struct { 
        int a; 
        char b; 
        int c[sizeof(int)]; 
      } structure_one;     (indentation OK) 
      typedef int new_type;
      typedef struct 
      { 
        int a; 
        char b; 
        int c[sizeof(new_type)]; 
      } structure_two; typedef int new_type;
      typedef struct { 
        int a; 
        char b; 
        int c[sizeof(new_type)]; 
      } 
      structure_two;     <---(strange indentation) 

* I am also attaching a picture to make my point more clear.

In the source-code above, I see that the side-effect is due to the "new_type" 
in the second structure.
You may also try it yourself. 

The question is, whether this behavior of "indent" intended to be as it is? 
  If it is intentional, then is there a command-line-switch to control it?
  If this is not a feature, then is it a bug or a side-effect?

I would really appreciate if I get some reply to this query.

With Best Wishes,
~
Jagmeet Singh Hanspal
( address@hidden )
~


reply via email to

[Prev in Thread] Current Thread [Next in Thread]