Bug 13738 – RTInfo generation on deprecated struct causes deprecation message

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-11-16T11:10:00Z
Last change time
2017-07-22T12:36:24Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
r.sagitario

Comments

Comment #0 by r.sagitario — 2014-11-16T11:10:44Z
Change the RTInfo declaration in object.di and object_.d to //////////////////////////////////////////////////////// template RTInfo(T) { enum RTInfo = cast(void*)RTInfoImpl!T; } template RTInfoImpl(T) { enum RTInfoImpl = &RTInfoImpl2!T; } template RTInfoImpl2(T) { immutable RTInfoImpl2 = 1234; } //////////////////////////////////////////////////////// and then compile a predrecated class or struct: ///////////////////////////////////// module test; deprecated class Dep { } ///////////////////////////////////// emits Deprecation: class test.Dep is deprecated As long as Dep is not actually used, the compiler should not emit a message.
Comment #1 by r.sagitario — 2014-11-16T11:15:06Z
Comment #2 by github-bugzilla — 2014-11-22T22:07:12Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/3ba4b64edb486f26fa5bd9b5b3b6dd0096d1540c Merge pull request #4147 from rainers/issue13738 Fix Issue 13738 - RTInfo generation on deprecated struct causes deprecation message
Comment #3 by github-bugzilla — 2015-02-18T03:40:10Z
Comment #4 by k.hara.pg — 2015-08-06T10:34:41Z
I think the root of diagnostic problem is issue 14875. If a template is instantiated with deprecated type, the touch to corresponding type parameter should not repeat redundant deprecation messages.
Comment #5 by k.hara.pg — 2015-08-06T11:18:42Z
This issue itself is already fixed.
Comment #6 by github-bugzilla — 2015-08-08T05:43:49Z
Comment #7 by github-bugzilla — 2017-07-22T12:36:24Z
Commit pushed to dmd-cxx at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/84c3642d4890cb9c30174b982712b6a8885d9f5a Remove the RTInfo specific code for issue 13738