GNU bug report logs - #27130
c-mode indentation mistreats structs in function arguments

Previous Next

Packages: emacs, cc-mode;

Reported by: Sam Pagenkopf <ssaammp <at> gmail.com>

Date: Mon, 29 May 2017 16:01:02 UTC

Severity: normal

Tags: confirmed

Full log


View this message in rfc822 format

From: Sam Pagenkopf <ssaammp <at> gmail.com>
To: 27130 <at> debbugs.gnu.org
Subject: bug#27130: c-mode indentation mistreats structs in function arguments
Date: Mon, 29 May 2017 08:33:35 -0500
[Message part 1 (text/plain, inline)]
In emacs 25.2.1.

Relevant code:

    draw_add(&battle.draw, (Drawn){
            .kind = DRAW_RECT,
                .size = {40,24},
                .pos.border = {
                .align = {ALIGN_LEFT, ALIGN_TOP},
                .dist = 3
            }
        }
        );

My guess is that it's reading (Drawn){...} as a statement, and the , as
the (,) C operator.
[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 196 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.