-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<xstring>: constexpr string does not compile with -d1initall #4473
Comments
Suspect this is GH-3862 , and in particular this uninitialized pointer: Lines 2618 to 2624 in d6efe94
The |
Your suggested fix works. |
Well, I suppose it's a good thing that option isn't documented, or we'd have a bug! =P |
It looks like that it is a bug in these options, I'd expect delay initialized pointer to compile |
Reduced example (Godbolt link) constexpr bool fun()
{
char* p [[maybe_unused]];
return true;
}
constexpr bool b = fun(); Filed DevCom-10614520. |
DevCom-10614520 is Fixed - pending release. Should we keep the initialization or pull it out later? |
Just keep it. |
The following code stopped compiling when d1initall is enabled.
https://godbolt.org/z/9EW3z1s5P
Godbolt shows the regression starting in v19.38. Cameron helped me track the regression to PR 490538: Port 14 GitHub PRs: GH-3939, GH-3900, GH-3935, GH-3912, GH-3927, GH-3936, GH-3862, GH-3903, GH-3904, GH-3920, GH-3921, GH-3930, GH-3933, GH-3934.
The text was updated successfully, but these errors were encountered: