GNU Indent 2.2.6 Behavior

"Jagmeet Singh Hanspal" <[email protected]>
Newsgroups gmane.comp.gnu.indent.bugs
Message-ID <003801c59720$7526c570$87c8a8c0@jagmeet>
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) 


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
( [email protected] )
~
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.