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: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Daniel P. Valentine <dpv>
Open/Closed: Open

Add a New Comment (Rich MarkupRich 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:

if (0)
malloc(zizeof(int)+2 * 2);

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




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

Attach File(s):

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
  • -unavailable- added by dpv (Updated the item)

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

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 24 Mar 2014 01:55:48 AM UTCdpvStatusNone=>Fixed
    Sat 22 Mar 2014 06:17:37 PM UTCdpvAssigned toNone=>dpv
    Sun 22 May 2011 07:00:05 AM UTCNoneAttached File-=>Added c.c, #23436
      Attached File-=>Added .indent.pro, #23437

    Back to the top

    Powered by Savane 3.1-cleanup