bugGNU indent - Bugs: bug #55953, Running indent multiple times...

 
 

bug #55953: Running indent multiple times gives different results

Submitter:  None
Submitted:  Tue 19 Mar 2019 08:33:53 AM UTC
   
 
Category:  C Severity:  3 - Normal
Item Group:  Inconsistency Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 19 Mar 2019 08:33:53 AM UTC, original submission:  

Running indent on the given the piece of code below gives different results. The resulted code keeps on toggling between the two formats.

OUTPUT FORMAT 1:
void
some_func ()
{                                                                                                                                                                                                                                                                                                                            
  /*  .....  */
  guint size =
      sizeof (gfloat[1][BLOCKSIZE][self->
          buffer_capacity][self->num_channels_enabled]);
  /*  .....  */
}

OUTPUT FORMAT 2:
void
some_func ()
{                                                                                                                                                                                                                                                                                                                            
  /*  .....  */
  guint size =
      sizeof (gfloat[1][BLOCKSIZE][self->buffer_capacity][self->
          num_channels_enabled]);
  /*  .....  */
}

I use indent with the following setting:
indent \
  --braces-on-if-line \
  --case-brace-indentation0 \
  --case-indentation2 \
  --braces-after-struct-decl-line \
  --line-length80 \
  --no-tabs \
  --cuddle-else \
  --dont-line-up-parentheses \
  --continuation-indentation4 \
  --honour-newlines \
  --tab-size8 \
  --indent-level2

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

No changes have been made to this item

Back to the top

Powered by Savane 3.13-4448.
Corresponding source code