[Issue 13471] CTFE glitch when executing std.digest.crc.crc32Of() and checking the result with enforce(). (keyword: uninitialized variable)

2019-05-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13471

Dlang Bot  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Dlang Bot  ---
dlang/phobos pull request #6976 "Fix issue 13471: can't use crc at CTFE" was
merged into master:

- 516432d185bf4ace339f7e571f1b46894e8536aa by Nicholas Lindsay Wilson:
  Fix issue 13471: can't use crc at CTFE

https://github.com/dlang/phobos/pull/6976

--


[Issue 13471] CTFE glitch when executing std.digest.crc.crc32Of() and checking the result with enforce(). (keyword: uninitialized variable)

2019-05-23 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13471
Issue 13471 depends on issue 19892, which changed state.

Issue 19892 Summary: Add CTFE support for std.bitmanip: nativeToBigEndian, 
bigEndianToNative, littleEndianToNative, nativeToLittleEndian
https://issues.dlang.org/show_bug.cgi?id=19892

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 13471] CTFE glitch when executing std.digest.crc.crc32Of() and checking the result with enforce(). (keyword: uninitialized variable)

2019-05-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13471

Nathan S.  changed:

   What|Removed |Added

 Depends on||19892


Referenced Issues:

https://issues.dlang.org/show_bug.cgi?id=19892
[Issue 19892] Add CTFE support for std.bitmanip: nativeToBigEndian,
bigEndianToNative, littleEndianToNative, nativeToLittleEndian
--


[Issue 13471] CTFE glitch when executing std.digest.crc.crc32Of() and checking the result with enforce(). (keyword: uninitialized variable)

2019-05-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13471

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #2 from Dlang Bot  ---
@thewilsonator updated dlang/phobos pull request #6976 "Fix issue 13741: can't
use crc at CTFE" fixing this issue:

- Fix issue 13471: can't use crc at CTFE

https://github.com/dlang/phobos/pull/6976

--


[Issue 13471] CTFE glitch when executing std.digest.crc.crc32Of() and checking the result with enforce(). (keyword: uninitialized variable)

2017-07-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13471

Vladimir Panteleev  changed:

   What|Removed |Added

   Keywords||diagnostic

--


[Issue 13471] CTFE glitch when executing std.digest.crc.crc32Of() and checking the result with enforce(). (keyword: uninitialized variable)

2015-01-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13471

Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

   Hardware|x86_64  |All

--- Comment #1 from Kenji Hara k.hara...@gmail.com ---
Reduced test case. Switch the error messages by -version=check.

enum buggy1 = foo(Hello World!);

ubyte[4] foo(string str) 
{
uint _state = uint.max;
ubyte[4] result = nativeToLittleEndian(~_state);

version(check)
{
import std.exception;
enforce(result != (ubyte[4]).init, this should not be thrown);
}
return result;
}

union EndianSwapper(T)
{
T value;
ubyte[T.sizeof] array;
}

auto nativeToLittleEndian(T)(T val)
{
return nativeToLittleEndianImpl(val);
}

auto nativeToLittleEndianImpl(T)(T val)
{
EndianSwapper!T es = void;
es.value = val;
return es.array;
}

--