[Issue 9289] Deprecated language features should be warn too when errors are normally silented

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 29 03:04:05 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9289



--- Comment #11 from Leandro Lucarella <leandro.lucarella at sociomantic.com> 2013-01-29 03:04:02 PST ---
(In reply to comment #10)
> (In reply to comment #9)
> > If we keep deprecated language features as errors by default, we will end up
> > with the exact same problem we had before making deprecations as warnings the
> > default. Why would we want to do that?
> 
> OK. I was convinced that it is the right thing to some extent.
> To make things keep simple, deprecations between language feature and
> user-defined symbols should be treated by a same way.
> I withdraw this regression, by lowering priority to "major".

I changed the title too, feel free to edit if you think is not entirely
correct.

> > The only problem I see right now is deprecated features are not being warn when gagging
> 
> I'd try to implement it in experiment.

Great! Thanks. Unless I'm missing something (I probably am :), this should be
enough:
---
diff --git a/src/mars.c b/src/mars.c
index 612b205..588ca40 100644
--- a/src/mars.c
+++ b/src/mars.c
@@ -269,7 +269,7 @@ void vdeprecation(Loc loc, const char *format, va_list ap,
     static const char *header = "Deprecation: ";
     if (global.params.useDeprecated == 0)
         verror(loc, format, ap, p1, p2, header);
-    else if (global.params.useDeprecated == 2 && !global.gag)
+    else if (global.params.useDeprecated == 2)
         verrorPrint(loc, header, format, ap, p1, p2);
 }

---

I don't have time now to make testcases and verify this would work though.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list