Is it a bug about the data type of -2147483649 ? - page 2

 

Suitable for the problem described above the following simple statements seem to have compiler problems:


void OnStart() {
   // No problem in the next two lines:
   int int_min_1 = -2147483647;
   PrintFormat("%d",int_min_1);  // Output -2147483647 - correct
   
   // The following statement generates a compiler warning:
   int int_min_2 = -2147483648;  // Warning 'truncation of constant value'
   PrintFormat("%d",int_min_2);  // Output -2147483648 - correct
   
   // The following statement does not generate any compiler warning or error
   // although out of int range
   int int_min_3 = -2147483649;  // No warning
   PrintFormat("%d",int_min_3);  // Output 2147483647 - incorrect
 
   // Same holds for here:
   // The following statement does not generate any compiler warning or error
   // although out of int range
   int int_min_4 = -4294967295;  // No warning
   PrintFormat("%d",int_min_4);  // Output 1 - incorrect
 
}

Matthias

 
I wonder if anyone from the admin of dev team will actually pay attention to this and have it fixed?
 

Is there any moderator could take a few minutes to report this bug to the dev team ?

 
Ziheng Zhuang #:

Is there any moderator could take a few minutes to report this bug to the dev team ?

As I see - you already reported to "MetaTrader Questions and Answers" group so I hope that will check it (if they have enough technical details and if they are able to reproduce this issue so I hope they will fix it).
 
Sergey Golubev #:
As I see - you already reported to "MetaTrader Questions and Answers" group so I hope that will check it (if they have enough technical details and if they are able to reproduce this issue so I hope they will fix it).

Yes, actually I did report a few times in that group but I got no reply.

Thank you.

 

Thank you all

It was wrong decision in the past to use uint type for the integers between INT_MAX and UINT_MAX

Fixed. Now integer constants can be of type int, long and ulong, depends on the value

 
Ilyas #:

Thank you all

It was wrong decision in the past to use uint type for the integers between INT_MAX and UINT_MAX

Fixed. Now integer constants can be of type int, long and ulong, depends on the value

Thank you.

 
Ilyas #:

Thank you all

It was wrong decision in the past to use uint type for the integers between INT_MAX and UINT_MAX

Fixed. Now integer constants can be of type int, long and ulong, depends on the value

Sorry the problem persists, using version 3446
 
Dr Matthias Hammelsbeck #:
Sorry the problem persists, using version 3446

I  did test on build 3446.

The result shows the bug has been fixed.

Reason: