bugGNU indent - Bugs: bug #42452, option to insert empty blocks for...

 
 

bug #42452: option to insert empty blocks for bodyless for() and while()

Submitter:  None
Submitted:  Wed 28 May 2014 03:16:13 PM UTC
Votes: 1
 
Category:  C Severity:  3 - Normal
Item Group:  Wishlist Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 22 Apr 2021 01:15:37 PM UTC, comment #1: 

This should not be an option, it should be on always!

Horst H. von Brand <vonbrand>
Wed 28 May 2014 03:16:13 PM UTC, original submission:  

Some people might consider this kind of code is dangerous maintenance-wise:

...
for(...);
...

That is, that the for loop body is empty is kind of overly subtle.  (Assumedly all the work is done in the loop statements.)

Therefore, an option which inserts an empty block for those might be nice.

(P.S. I swear I don't want to delay the next release of GNU indent after this long hiatus... but these ideas just keep popping into my mind.)


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

 

Carbon-Copy List
  • -email is unavailable- added by vonbrand (Posted a comment)
  • -email is unavailable- added by vonbrand (Voted in favor of this item)
  •  

    There is 1 vote 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.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-04-22 vonbrand Carbon-Copy- Added vonbrand

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code