[Issue 20339] isPOD returns true if sizeof is accessed inside struct declaration

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 21 12:01:19 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=20339

--- Comment #2 from Dlang Bot <dlang-bot at dlang.rocks> ---
@tim-dlang created dlang/dmd pull request #15939 "Calculate isPOD without
information from semantic run" fixing this issue:

- Calculate isPOD without information from semantic run

  Fix issue 20339 - isPOD returns true if sizeof is accessed inside struct
declaration
  Fix issue 24292 - Struct with destructor wrongly returned in register

  Function StructDeclaration.isPOD can be called before the semantic run
  for the struct is finished. It then uses incomplete information about
  destructors, postblits and copy constructors. The result of isPOD is
  cached, so later calls will also return the wrong result.

  This commit changes isPOD, so it uses variables, which are already
  filled before the semantic run.

https://github.com/dlang/dmd/pull/15939

--


More information about the Digitalmars-d-bugs mailing list