[Issue 18792] Incorrect scope analysis with -dip1000 for small-sized-optimized string

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 10 19:22:40 UTC 2021


Dennis <dkorpel at live.nl> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |dkorpel at live.nl
         Resolution|---                         |DUPLICATE
           Severity|enhancement                 |normal

--- Comment #5 from Dennis <dkorpel at live.nl> ---
I know this issue was first, but 21868 already got a pull.

It is the same problem: `return scope` without `ref return` applies return the
values (e.g. SSOString.raw.ptr), not the address of SSOString itself (e.g.
SSOString.small.data.ptr), but the compiler doesn't check for return-scope or
return-ref, just return. The declaration of `Raw raw` is needed because
otherwise SSOString has no pointers, so return scope is stripped away, so the
compiler can't mistake the return attribute anymore and raises the correct

*** This issue has been marked as a duplicate of issue 21868 ***


More information about the Digitalmars-d-bugs mailing list