Passing stack allocated string to `assert`
    Walter Bright 
    newshound2 at digitalmars.com
       
    Wed Dec 18 22:25:51 UTC 2019
    
    
  
On 12/17/2019 12:47 AM, Jacob Carlborg wrote:
> This code compiles with DMD 2.089.0 with the `-dip1000` flag:
> 
> void main() @safe
> {
>      char[10] buffer = "0123456789";
>      assert(false, buffer[]);
> }
> 
> Running this code will obviously assert, but the assert message contains 
> garbage. Should DIP1000 be able to catch this?
Please add to bugzilla.
    
    
More information about the Digitalmars-d
mailing list