[Issue 14272] DMD segfault on invalid circular enum initialization
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Mar 11 04:53:40 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14272
Kenji Hara <k.hara.pg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |pull
Summary|DMD segfault in in |DMD segfault on invalid
|Dsymbol::checkDeprecated(Lo |circular enum
|c, Scope*) on possibly |initialization
|invalid code |
Severity|normal |major
--- Comment #4 from Kenji Hara <k.hara.pg at gmail.com> ---
(In reply to Ketmar Dark from comment #3)
> yes, such code should trigger forward reference error. the following patch
> seems to fix it:
>
[snip]
At the head of VarDeclaration::semantic(), v->scope is set to NULL, so the
v->inuse check needs to be placed before the if (v->scope) { ... } statement.
https://github.com/D-Programming-Language/dmd/pull/4482
--
More information about the Digitalmars-d-bugs
mailing list