From 5c6ba2ec3ba9f13d59942723e5e2aa91057c93c1 Mon Sep 17 00:00:00 2001 From: kai Date: Thu, 28 Feb 2013 06:58:45 +0100 Subject: [PATCH] Add missing pragma and deprecation warning. The LDC_allow_inline pragma is not recognized. The deprecation message for non-vendor pragmas is missing. --- dmd2/statement.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dmd2/statement.c b/dmd2/statement.c index 6c80d7d8..2365210d 100644 --- a/dmd2/statement.c +++ b/dmd2/statement.c @@ -3168,9 +3168,14 @@ Statement *PragmaStatement::semantic(Scope *sc) #endif } #if IN_LLVM - // LDC - else if (ident == Id::allow_inline) + // FIXME Move to pragma.cpp + else if (ident == Id::LDC_allow_inline || ident == Id::allow_inline) { +#if DMDV2 + if (ident == Id::allow_inline && !global.params.useDeprecated) + error("non-vendor-prefixed pragma '%s' is deprecated; use '%s' instead", + Id::allow_inline->toChars(), Id::LDC_allow_inline->toChars()); +#endif sc->func->allowInlining = true; } #endif