[Issue 24867] Wrong deprecation warning of @system variable usage under CTFE
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 19 19:10:01 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24867
--- Comment #6 from kinke <kinke at gmx.net> ---
(In reply to Luís Ferreira from comment #5)
> > It needs to be stressed that the deprecation comes from the **outer** `align(1)`, which is IMO a total anti-pattern anyway.
>
> It's clear to me that blindly doing align(1) everywhere is an anti-pattern,
> but its not an always bad situation, there's places you really need to do
> this, e.g. implementing a protocol, dealing with raw data emplacement, etc.
> And I'm pretty sure you are well aware of those use-cases.
>
> Btw, we use it a lot, in traces protocol and probably also on the filesystem
> code, which, neither of those are ever tracked by the GC.
>
> Therefore, it doesn't mean it shouldn't be supported. Anyway, I guess I
> don't have to explain it, but did it anyway.
Any outer `align(1)` would never pass my code review - type alignments are okay
for over-alignment, but not for under-alignment, those should always be field
alignments. No example you gave here justifies the outer `align(1)`, the
aggregates are all `align(1)` anyway.
--
More information about the Digitalmars-d-bugs
mailing list