Permalink
Browse files

Merge pull request #1785 from rainers/rtinfo_on_deprecated

fix issue 9782: do not generate RTInfo for deprecated types and _error_ types
  • Loading branch information...
2 parents 606e392 + 3452692 commit 5178fe76b83593ab12a8f40c79fdf2e400bb0fd9 @WalterBright WalterBright committed Mar 22, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/struct.c
View
@@ -106,7 +106,9 @@ void AggregateDeclaration::semantic3(Scope *sc)
}
sc->pop();
- if (!getRTInfo)
+ if (!getRTInfo && Type::rtinfo &&
+ (!isDeprecated() || global.params.useDeprecated) && // don't do it for unused deprecated types
+ (type && type->ty != Terror)) // or error types
{ // Evaluate: gcinfo!type
Objects *tiargs = new Objects();
tiargs->push(type);

0 comments on commit 5178fe7

Please sign in to comment.