bug-indent
[Top][All Lists]
Advanced

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

C99 compound literals are not formatted correctly with indent's default


From: Koz Ross
Subject: C99 compound literals are not formatted correctly with indent's default arguments
Date: Tue, 5 May 2015 18:08:19 +1200

When I try to format the following (using indent with default arguments):

tree_node_s *t = GC_MALLOC_ATOMIC (sizeof (tree_node_s));
*t = (tree_node_s){.val = n,.h = 0};

it ends up looking like this:

tree_node_s *t = GC_MALLOC_ATOMIC (sizeof (tree_node_s));
*t = (tree_node_s)
  {
  .val = n,.h = 0};

Now, this (aside from being really ugly) is not obviously a compound literal 
from its appearance. This appears to be a bug.

-- 
Koz Ross <address@hidden>
www.retro-freedom.nz
If you aren't using GPG, you should be! https://emailselfdefense.fsf.org/en/
****
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

Attachment: pgpIxw1epoVHr.pgp
Description: PGP signature


reply via email to

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