bugGNU indent - Bugs: bug #60355, C99 compound literals

 
 

bug #60355: C99 compound literals

Submitter:  Helmut Eller <ellerh>
Submitted:  Wed 07 Apr 2021 02:24:07 PM UTC
Votes: 50
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 07 Apr 2021 02:24:07 PM UTC, original submission:  

GNU indent 2.2.12 reformats input that looks like this:

struct foo
f (void)
{
  return (struct foo) { .bar = 2 };
}

to

struct foo
f (void)
{
  return (struct foo)
  {.bar = 2 };
}


That seems rather wrong to me and I would prefer the original layout.

Helmut Eller <ellerh>

 

(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 softmoth (Voted in favor of this item)
  • -email is unavailable- added by ellerh (Submitted the item)
  •  

    There are 50 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.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-09-12 softmoth Carbon-Copy- Added softmoth

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code