https://gcc.gnu.org/g:d2f10fc934c3a425cf31979b1cf41fdc0f57c6d6
commit r15-3646-gd2f10fc934c3a425cf31979b1cf41fdc0f57c6d6 Author: Andrew Pinski <quic_apin...@quicinc.com> Date: Fri Sep 13 20:17:15 2024 -0700 Mark the copy/move constructor/operator= of auto_bitmap as delete Since we are written in C++11, these should be marked as delete rather than just private. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * bitmap.h (class auto_bitmap): Mark copy/move constructor/operator= as deleted. Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com> Diff: --- gcc/bitmap.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/bitmap.h b/gcc/bitmap.h index 4cad1b4d6c6a..451edcfc5907 100644 --- a/gcc/bitmap.h +++ b/gcc/bitmap.h @@ -959,10 +959,10 @@ class auto_bitmap private: // Prevent making a copy that references our bitmap. - auto_bitmap (const auto_bitmap &); - auto_bitmap &operator = (const auto_bitmap &); - auto_bitmap (auto_bitmap &&); - auto_bitmap &operator = (auto_bitmap &&); + auto_bitmap (const auto_bitmap &) = delete; + auto_bitmap &operator = (const auto_bitmap &) = delete; + auto_bitmap (auto_bitmap &&) = delete; + auto_bitmap &operator = (auto_bitmap &&) = delete; bitmap_head m_bits; };