bugGNU indent - Bugs: bug #33364, Spaces around + omitted in an edge...

 
 

bug #33364: Spaces around + omitted in an edge case

Submitter:  None
Submitted:  Sun 22 May 2011 07:00:05 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  dpv
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 24 Mar 2014 01:55:48 AM UTC, comment #1: 

This was caused by an overly broad application of the exception to the general rule that a cast can't follow an identifier.  A "return" can be followed directly by a cast, but the possibility of interpreting a data type in parentheses as a cast was continuing until the next keyword was found.  Reset the reserved word memory after a "return" once its job had been done.  (Regression test added.)

Daniel P. Valentine <dpv>
Group administrator
Sun 22 May 2011 07:00:05 AM UTC, original submission:  

Spaces around + are omitted in the following:

    main()
    {
        if (0)
            return;
        malloc(zizeof(int)+2 * 2);
    }

Changing zizeof to sizeof, or deleting the return statement, makes the problem disappear. .indent.pro is:

-bap
-bl
-bli0
-i4
-il0
-l80
-ncs
-nlp
-npcs
-ts4

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #23436:  c.c added by None (63B - text/plain)
file #23437:  .indent.pro added by None (60B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by andrewsh (Updated the item)
  • -email is unavailable- added by dpv (Updated 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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-09-06 andrewsh Open/ClosedOpen Closed
    2014-03-24 dpv StatusNone Fixed
    2014-03-22 dpv Assigned toNone dpv
    2011-05-22 None Attached File- Added c.c, #23436
        Attached File- Added .indent.pro, #23437

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code