bugGNU indent - Bugs: bug #58222, indent -nsai can misapply #defined...

 
 

bug #58222: indent -nsai can misapply #defined tokens

Submitter:  Mark Shoulson <clsn>
Submitted:  Tue 21 Apr 2020 06:32:18 PM 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
   

Tue 21 Apr 2020 06:32:18 PM UTC, original submission:  

I inherited some code which defined

#define LOGGING (0)

(or other possibilities)

and later would say

if LOGGING fprintf(....);


This is fine.  But when used with the -nsai option of GNU indent, it would turn into

ifLOGGING fprintf(....);

which of course does not compile.

Mark Shoulson <clsn>

 

(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 clsn (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.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code