Bug 13126 – Error: redundant storage class 'static'

Status
RESOLVED
Resolution
INVALID
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-07-13T19:00:00Z
Last change time
2014-07-14T10:43:06Z
Assigned to
nobody
Creator
doob

Comments

Comment #0 by doob — 2014-07-13T19:00:55Z
This code compiled in DMD 2.065.0 but not in DMD 2.066.0-b3: static static void foo (); The error message I get is: " Error: redundant storage class 'static'". Wouldn't it be possible to give a deprecation message about this?
Comment #1 by bugzilla — 2014-07-13T20:08:38Z
Comment #2 by k.hara.pg — 2014-07-13T20:35:20Z
(In reply to Jacob Carlborg from comment #0) > Wouldn't it be possible to give a deprecation message about this? No, it was _just_ an accepts-invalid bug and it will be properly fixed in 2.066. "feature deprecation cycle" should be enabled if the original code have valid meaning in old D semantics and then the semantics will be changed to another valid one.
Comment #3 by bugzilla — 2014-07-13T21:00:34Z
I agree that it was invalid code that should never have been accepted, but it was harmless enough and I was thinking along the lines of easing the transition. Jacob, is this really a problem to fix? Is static static pervasive in your code, or just one spot?
Comment #4 by bearophile_hugs — 2014-07-13T21:09:39Z
(In reply to Walter Bright from comment #3) > and I was thinking along the lines of easing the transition. Easing the transitions is acceptable (perhaps a bit faster in this case). What's important is to actually remove bugs/sloppiness from D.
Comment #5 by bugzilla — 2014-07-13T21:16:52Z
(In reply to bearophile_hugs from comment #4) > What's important is to actually remove bugs/sloppiness from D. I don't think anyone suggested otherwise.
Comment #6 by doob — 2014-07-13T21:22:47Z
(In reply to Walter Bright from comment #3) > I agree that it was invalid code that should never have been accepted, but > it was harmless enough and I was thinking along the lines of easing the > transition. Yes, easing the transition would be nice. > Jacob, is this really a problem to fix? Is static static pervasive in your > code, or just one spot? No, it's not a problem to fix. It's just one spot, so far. I'm getting new regressions after fixing this. Calming that D is stable and ready for production but not be able to easy transitions like this doesn't go hand in hand in my opinion. Especially since the extra "static" was probably a noop to being with. There have been regressions in DWT for every release since, probably, 2.050.
Comment #7 by yebblies — 2014-07-14T10:43:06Z
(In reply to Jacob Carlborg from comment #6) > (In reply to Walter Bright from comment #3) > > I agree that it was invalid code that should never have been accepted, but > > it was harmless enough and I was thinking along the lines of easing the > > transition. > > Yes, easing the transition would be nice. > Bug fixes to not typically get deprecation cycles. An exception could always be made if it was particularly disruptive but it doesn't sound like that's the case.