On Sunday, July 31, 2016 21:45:25 Cauterite via Digitalmars-d wrote:
> On Saturday, 30 July 2016 at 00:55:11 UTC, Charles Hixson wrote:
> > FWIW, in that case I always use
> > assert (false, "...");
> > I try to never use integers for booleans. But this may well be
> > a common usage.
>
> I
On Saturday, 30 July 2016 at 00:55:11 UTC, Charles Hixson wrote:
FWIW, in that case I always use
assert (false, "...");
I try to never use integers for booleans. But this may well be
a common usage.
I suspect `assert(0)` is really `assert(constexpr>)`, so you should be fine. Both styles are
On 07/26/2016 07:36 AM, ketmar via Digitalmars-d wrote:
On Tuesday, 26 July 2016 at 14:28:48 UTC, Timon Gehr wrote:
"The expression assert(0) is a special case; it signifies that it is
unreachable code. [...] The optimization and code generation phases
of compilation may assume that it is
On Thursday, 28 July 2016 at 00:17:16 UTC, Walter Bright wrote:
On 7/27/2016 3:47 PM, qznc wrote:
On Wednesday, 27 July 2016 at 07:59:54 UTC, Walter Bright
wrote:
"The expression assert(0) is a special case; it signifies
code that should be
unreachable. If it is reached at runtime, either
On Wednesday, 27 July 2016 at 07:59:54 UTC, Walter Bright wrote:
"The expression assert(0) is a special case; it signifies code
that should be unreachable. If it is reached at runtime, either
AssertError is thrown or execution is terminated in an
implementation-defined manner. Any code after
On 7/27/2016 3:47 PM, qznc wrote:
On Wednesday, 27 July 2016 at 07:59:54 UTC, Walter Bright wrote:
"The expression assert(0) is a special case; it signifies code that should be
unreachable. If it is reached at runtime, either AssertError is thrown or
execution is terminated in an
On Wednesday, 27 July 2016 at 07:59:54 UTC, Walter Bright wrote:
"The expression assert(0) is a special case; it signifies code
that should be unreachable. If it is reached at runtime, either
AssertError is thrown or execution is terminated in an
implementation-defined manner. Any code after
On 7/27/2016 12:28 AM, Shachar Shemesh wrote:
On 27/07/16 10:14, Walter Bright wrote:
Thank you. I'd prefer it to say something along the lines that it stops
execution at the assert(0) in an implementation-defined manner. This
leaves whether messages are printed or not, etc., up to the
On 27/07/16 10:14, Walter Bright wrote:
Thank you. I'd prefer it to say something along the lines that it stops
execution at the assert(0) in an implementation-defined manner. This
leaves whether messages are printed or not, etc., up to the
implementation. I don't think the spec should require
On 7/26/2016 11:49 PM, Shachar Shemesh wrote:
Current text (after the strange copying corruption):
The expression assert(0) is a special case; it signies that it is unreachable
code. Either
AssertError is thrown at runtime if it is reachable, or the execution is
halted (on the x86 processor,
a
On 27/07/16 08:50, Walter Bright wrote:
On 7/26/2016 10:24 PM, Shachar Shemesh wrote:
Most D programmers, however, expect the program not to continue
executing past
an assert(false). They might see it as a bug. Hence my question
whether that
means D is not meant for programming in privileged
On 27.07.2016 07:50, Walter Bright wrote:
On 7/26/2016 10:24 PM, Shachar Shemesh wrote:
Most D programmers, however, expect the program not to continue
executing past
an assert(false). They might see it as a bug. Hence my question
whether that
means D is not meant for programming in privileged
On 26.07.2016 21:11, Steven Schveighoffer wrote:
On 7/26/16 2:44 PM, Timon Gehr wrote:
On 26.07.2016 17:44, Johan Engelen wrote:
The compiler can assume it is unreachable code, but it has to keep it,
That makes no sense. Those two statements are mutually exclusive.
I thought that assert(0)
On 7/26/2016 10:24 PM, Shachar Shemesh wrote:
Most D programmers, however, expect the program not to continue executing past
an assert(false). They might see it as a bug. Hence my question whether that
means D is not meant for programming in privileged mode.
Obviously, HALT means any
On 27/07/16 08:03, deadalnix wrote:
On Wednesday, 27 July 2016 at 03:31:07 UTC, Adam D. Ruppe wrote:
On Wednesday, 27 July 2016 at 03:13:38 UTC, Shachar Shemesh wrote:
Does that mean D isn't meant to be used to develop code that will run
in Ring-0?
assert(0) is never supposed to actually
On Wednesday, 27 July 2016 at 03:31:07 UTC, Adam D. Ruppe wrote:
On Wednesday, 27 July 2016 at 03:13:38 UTC, Shachar Shemesh
wrote:
Does that mean D isn't meant to be used to develop code that
will run in Ring-0?
assert(0) is never supposed to actually happen...
Though, I do think it might
On Wednesday, 27 July 2016 at 03:13:38 UTC, Shachar Shemesh wrote:
Does that mean D isn't meant to be used to develop code that
will run in Ring-0?
assert(0) is never supposed to actually happen...
Though, I do think it might be better to make it output `forever:
hlt; jmp forever;` which I
On 27/07/16 00:56, Walter Bright wrote:
What the assert(0) actually does is insert a HALT instruction, even when
-release is used. The spec is poorly worded.
Does that mean D isn't meant to be used to develop code that will run in
Ring-0?
Or do we treat it as a feature that kernel mode
On 7/26/2016 7:28 AM, Timon Gehr wrote:
According to the language documentation, the patch does not fix the problem.
https://dlang.org/spec/expression.html#AssertExpression
"The expression assert(0) is a special case; it signifies that it is unreachable
code. [...] The optimization and code
On Tuesday, 26 July 2016 at 21:53:48 UTC, Walter Bright wrote:
On 7/26/2016 8:24 AM, Robert burner Schadek wrote:
A perfect example for an item for your action list.
Anybody can work on this!
That's the point! Put it on the list so people know.
On 7/26/2016 8:24 AM, Robert burner Schadek wrote:
A perfect example for an item for your action list.
Anybody can work on this!
On 7/26/16 2:44 PM, Timon Gehr wrote:
On 26.07.2016 17:44, Johan Engelen wrote:
The compiler can assume it is unreachable code, but it has to keep it,
That makes no sense. Those two statements are mutually exclusive.
I thought that assert(0) means that the compiler does not need to check
On 26.07.2016 17:44, Johan Engelen wrote:
On Tuesday, 26 July 2016 at 14:28:48 UTC, Timon Gehr wrote:
According to the language documentation, the patch does not fix the
problem.
https://dlang.org/spec/expression.html#AssertExpression
"The expression assert(0) is a special case; it signifies
On Tuesday, 26 July 2016 at 14:28:48 UTC, Timon Gehr wrote:
According to the language documentation, the patch does not fix
the problem.
https://dlang.org/spec/expression.html#AssertExpression
"The expression assert(0) is a special case; it signifies that
it is unreachable code. [...] The
A perfect example for an item for your action list.
On Tuesday, 26 July 2016 at 14:28:48 UTC, Timon Gehr wrote:
"The expression assert(0) is a special case; it signifies that
it is unreachable code. [...] The optimization and code
generation phases of compilation may assume that it is
unreachable code."
so specs should be fixed. i bet
On 26.07.2016 00:17, Walter Bright wrote:
In poking around in Phobos, I found a number of cases like:
https://github.com/dlang/phobos/pull/4655
where overflow is possible in calculating storage sizes. Since
allocation normally happens in @trusted code, these are a
safety/security hole.
In poking around in Phobos, I found a number of cases like:
https://github.com/dlang/phobos/pull/4655
where overflow is possible in calculating storage sizes. Since allocation
normally happens in @trusted code, these are a safety/security hole.
When reviewing Phobos submissions, please
28 matches
Mail list logo