Bug #15112 2009-01-24 13:18

saswat2603

Incorrect data-type tool-tip

C::B gets confused about the data-type when prefix increments( ++C ) or pointer(*) are used. For example :

Code:
/* Line 1 */     #include <stdio.h>
/* Line 2 */     int main()
/* Line 3 */     {
/* Line 4 */          int x, y, z;
/* Line 5 */          scanf("%d %d",&x,&y);
/* Line 6 */          ++x;
/* Line 7 */          --x;
/* Line 8 */          z = x*y;
/* Line 9 */          return 0;
/* Line 10 */     }


>> Hovering on 'x' in Line 6 shows "x : int". [CORRECT]
>> Hovering on 'x' in Line 7 shows "x : int" and "x : + +". [WRONG. Should be "x : int"]
>> Hovering on 'x' in Line 8 shows "x : int" , "x : + +" and "x : - -". [WRONG. Should be "x : int"]

Another code:

/* Line 1 */     #include <stdio.h>
/* Line 2 */     int main()
/* Line 3 */     {
/* Line 4 */          char A, *B, C;
/* Line 5 */          C = 'C';
/* Line 6 */          A = 'A';
/* Line 7 */          B = &C;
/* Line 8 */          A = *B;
/* Line 9 */          return 0;
/* Line 10 */     }


>> Hovering mouse on 'A' shows "A : char". [CORRECT]
>> Hovering mouse on 'C' shows "C : char *". [WRONG. Should be "A : char"].

=========================================

Running Code::Blocks 8.02 build 5382 on Windows XP Service Pack 3.
Category
Application::WrongBehaviour
Group
 
Status
Closed
Close date
2011-04-15 08:40
Assigned to
mortenmacfly
mortenmacfly 2011-02-24 05:47

Does this bug still persist?

mortenmacfly 2011-04-15 08:40

This bug is now fixed in HEAD.

Thank you for reporting it.