Bug 17074 – extern(C++, keyword) crashes compiler

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-01-08T18:42:00Z
Last change time
2017-08-02T08:07:09Z
Assigned to
nobody
Creator
ibuclaw

Comments

Comment #0 by ibuclaw — 2017-01-08T18:42:54Z
Some random examples, just to show that any tokenized keyword can trigger it. extern(C++, cast) void crash(); extern(C++, __parameters) void crash(); extern(C++, __MODULE__) void crash(); extern(C++, macro) void crash(); extern(C++, ...) void crash();
Comment #1 by ibuclaw — 2017-01-08T18:44:20Z
Putting as regression as adding `extern(C++, nspace)` support would have been the reason this happens, and it looks like was implemented without proper handling of syntax errors.
Comment #2 by github-bugzilla — 2017-01-11T11:02:42Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/e4516073a3e0d5d92499fc6e1a5b184eb4e87f31 Fix Issue 17074: extern(C++, keyword) crashes compiler This change unsets 'idents' if an error occurred parsing the C++ namespace, so that the later check for 'assert(idents.dim)' never fires. https://issues.dlang.org/show_bug.cgi?id=17074 https://github.com/dlang/dmd/commit/b35ec9c94a14d226dcbb5758eedd8e7d2cc4cb53 Merge pull request #6415 from ibuclaw/issue17074 Fix Issue 17074: extern(C++, keyword) crashes compiler
Comment #3 by github-bugzilla — 2017-01-15T01:21:04Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/e4516073a3e0d5d92499fc6e1a5b184eb4e87f31 Fix Issue 17074: extern(C++, keyword) crashes compiler https://github.com/dlang/dmd/commit/b35ec9c94a14d226dcbb5758eedd8e7d2cc4cb53 Merge pull request #6415 from ibuclaw/issue17074
Comment #4 by github-bugzilla — 2017-01-16T23:26:21Z
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/e4516073a3e0d5d92499fc6e1a5b184eb4e87f31 Fix Issue 17074: extern(C++, keyword) crashes compiler https://github.com/dlang/dmd/commit/b35ec9c94a14d226dcbb5758eedd8e7d2cc4cb53 Merge pull request #6415 from ibuclaw/issue17074
Comment #5 by github-bugzilla — 2017-08-02T08:07:09Z
Commit pushed to dmd-cxx at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/c8f1a623fe76ee302c3dcfcfae162a1037c18cf4 Issue 17074: extern(C++, keyword) crashes compiler