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

 
 

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

Submitted by:  None
Submitted on:  Sun 22 May 2011 07:00:05 AM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  Daniel P. Valentine <dpv>
Open/Closed:  Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
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 dpv (Updated the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    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.3