Thread overview | ||||||
---|---|---|---|---|---|---|
|
December 15, 2017 Is there a pragma or command line option to ask DMD to show a warning when it implicitly casts from long to ulong ? | ||||
---|---|---|---|---|
| ||||
It's taken me some time to find an implicit cast bug ("if (my_sometimes_negative_index >= this_array.length)"), while a simple C++-like implicit-cast warning would have allowed me to find this nasty bug WAY sooner... |
December 15, 2017 Re: Is there a pragma or command line option to ask DMD to show a warning when it implicitly casts from long to ulong ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ecstatic Coder | On Friday, December 15, 2017 20:40:10 Ecstatic Coder via Digitalmars-d-learn wrote: > It's taken me some time to find an implicit cast bug ("if (my_sometimes_negative_index >= this_array.length)"), while a simple C++-like implicit-cast warning would have allowed me to find this nasty bug WAY sooner... No. https://issues.dlang.org/show_bug.cgi?id=259 - Jonathan M Davis |
December 15, 2017 Re: Is there a pragma or command line option to ask DMD to show a warning when it implicitly casts from long to ulong ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | On Friday, 15 December 2017 at 21:29:10 UTC, Jonathan M Davis wrote:
> On Friday, December 15, 2017 20:40:10 Ecstatic Coder via Digitalmars-d-learn wrote:
>> It's taken me some time to find an implicit cast bug ("if (my_sometimes_negative_index >= this_array.length)"), while a simple C++-like implicit-cast warning would have allowed me to find this nasty bug WAY sooner...
>
> No.
>
> https://issues.dlang.org/show_bug.cgi?id=259
>
> - Jonathan M Davis
How does something like this get left for so long...
|
December 15, 2017 Re: Is there a pragma or command line option to ask DMD to show a warning when it implicitly casts from long to ulong ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Michael | On Friday, 15 December 2017 at 21:55:12 UTC, Michael wrote:
> On Friday, 15 December 2017 at 21:29:10 UTC, Jonathan M Davis wrote:
>> On Friday, December 15, 2017 20:40:10 Ecstatic Coder via Digitalmars-d-learn wrote:
>>> It's taken me some time to find an implicit cast bug ("if (my_sometimes_negative_index >= this_array.length)"), while a simple C++-like implicit-cast warning would have allowed me to find this nasty bug WAY sooner...
>>
>> No.
>>
>> https://issues.dlang.org/show_bug.cgi?id=259
>>
>> - Jonathan M Davis
>
> How does something like this get left for so long...
+1
|
Copyright © 1999-2021 by the D Language Foundation