-
Notifications
You must be signed in to change notification settings - Fork 97
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
unique_ptr fails to build with GCC 9 (and 10) #204
Comments
We've got some time scheduled later this year to bump up our compiler. In the meantime I'll see if someone can take a quick peek. |
Looks like the way that decltype works has changed perhaps. Anyhow, fixed the issue with a commit that should make its way out of gerrit soon. |
Thanks @ibmzach |
op-jenkins
pushed a commit
that referenced
this issue
Mar 22, 2022
This commit makes a small change to fix operator[] for the unique_ptr class for GCC 9 and 10. On GCC 9 and 10, operator[] was not returning a reference and our testcases were failing to compile, even though GCC 8 does compile it to return a reference. Also adds a testcase for const unique_ptr and unique_ptr-to-const. Resolves #204 Change-Id: Ia8bca57fd70656446eb81f8bcca4122cb4d280ff Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/128882 Tested-by: Jenkins OP Build CI <[email protected]> Tested-by: Jenkins Server <[email protected]> Tested-by: Jenkins Combined Simics CI <[email protected]> Tested-by: FSP CI Jenkins <[email protected]> Tested-by: Jenkins OP HW <[email protected]> Tested-by: Hostboot CI <[email protected]> Reviewed-by: Roland Veloz <[email protected]> Reviewed-by: Isaac Salem <[email protected]> Reviewed-by: Daniel M Crowell <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When building hostboot with a newer GCC (see open-power/op-build#4595):
The failure is in the test case (no in hostboot seems to trigger it) here https://github.com/open-power/hostboot/blob/master-p10/src/usr/testcore/lib/unique_ptr.H#L116
Removing this code allows the build to complete. However, this code seems to be valid. If we build it using GCC's unique_ptr.h, it compiles and the test case runs.
I don't understand what the templates are doing here, but it seems they are the cause of the problem:
The text was updated successfully, but these errors were encountered: