indent duplicate const

Bug #978952 reported by Marco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
indent (Ubuntu)
Fix Committed
Undecided
Unassigned

Bug Description

using GNU indent 2.2.11

file in test.cpp

void test::test () const
     {
     }

file out test.cpp after indent
void
test::test () const const
{
}

this is reported here
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=349065

for resolve change in handletoken.c

1452 if ((parser_state_tos->last_token == rparen) &&
1453 parser_state_tos->in_parameter_declaration &&
1454 parser_state_tos->saw_double_colon &&
1455 !strncmp (token, "const", 5))

to

1452 if ((parser_state_tos->last_token == rparen) &&
1453 parser_state_tos->in_parameter_declaration &&
1454 parser_state_tos->saw_double_colon &&
1455 (!strncmp (token, "const", 5)==0))

Revision history for this message
Marco (marcolikis) wrote :

Another bug...

original file:
void function () {
     DynamicPtr < Iterator < int > > iterator;
}

generate:

void function () {
     DynamicPtr < Iterator < int >>iterator;
}

Flags:
indent -nbad -bap -nbc -bbo -hnl -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -d0 -di1 -nfc1 -i8 -ip0 -l100 -lp -npcs -nprs -npsl -sai -saf -saw -cs -nsc -sob -nfca -cp33 -ss -ut -il1 -brf

Revision history for this message
Marco (marcolikis) wrote :

DynamicPtr is a #define

Revision history for this message
Marco (marcolikis) wrote :

DynamicPtr is
#define auto_ptr

Revision history for this message
Marco (marcolikis) wrote :

in first call

    HashMap < SandboxControl * >&getSandboxControl() {
          return mapSandboxControl;
   } private:
       HashMap < SandboxControl * >mapSandboxControl;

in second call

    HashMap < SandboxControl * >&getSandboxControl() {
          return mapSandboxControl;
   }
   private:
       HashMap < SandboxControl * >mapSandboxControl;

in third call repet first...
in fourth call repet the second... ....

Revision history for this message
Marco (marcolikis) wrote :

the #4 in Header file

Revision history for this message
Andrej Shadura (andrew.sh) wrote :

This has been fixed upstream, but won’t be ported to this version.

Changed in indent (Ubuntu):
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.