bugGNU indent - Bugs: bug #55192, Use psl option can't get the...

 
 

bug #55192: Use psl option can't get the expect result.

Submitter:  YumingMa <yuming>
Submitted:  Mon 10 Dec 2018 06:10:56 AM UTC
   
 
Category:  C Severity:  3 - Normal
Item Group:  Incorrect Result Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 10 Dec 2018 06:23:51 AM UTC, comment #1: 

I'm sorry for the before format. I rearranged it.


#define MUST_CHECK _attribute_((warn_unused_result))
#define NONNULL(params) _attribute_ ((_nonnull_ params))
static MUST_CHECK NONNULL((1,3,5)) int foo(void);


Use indent the function declaration:

#define MUST_CHECK             __attribute__((warn_unused_result))
#define NONNULL(params)        __attribute__ ((__nonnull__ params))

static MUST_CHECK
NONNULL(
    (1,
     3,
     5)
)
     int foo(
    void
);


but I want to get the below style:

static MUST_CHECK NONNULL((1,3,5))
int
foo(
    void
    );


YumingMa <yuming>
Mon 10 Dec 2018 06:10:56 AM UTC, original submission:  

For example, given the input:
#define MUST_CHECK             _attribute_((warn_unused_result))
#define NONNULL(params)        _attribute_ ((_nonnull_ params))

static MUST_CHECK NONNULL((1,3,5)) int foo(void);

Use indent the function declaration:

static MUST_CHECK
NONNULL(
    (1,
     3,
     5)
)
     int foo(
    void
);

YumingMa <yuming>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #45613:  indent.c~ added by yuming (186B - application/octet-stream - indent test file.)
file #45614:  indent.c added by yuming (215B - application/octet-stream - indent test file.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by yuming (Submitted the item)
  •  

    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.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-12-10 yuming Attached File- Added indent.c~, #45613
        Attached File- Added indent.c, #45614

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code