diff --git a/include/ChangeLog b/include/ChangeLog index f8f7747640e..ce56e95b549 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2022-10-03 Jan-Benedict Glaw + + * diagnostics.h (DIAGNOSTIC_IGNORE_SELF_MOVE): Define for GCC 13+. + 2022-07-08 Nick Clifton * 2.39 branch created. diff --git a/include/diagnostics.h b/include/diagnostics.h index 4161dff6abc..c1a2e8f520c 100644 --- a/include/diagnostics.h +++ b/include/diagnostics.h @@ -99,6 +99,10 @@ DIAGNOSTIC_IGNORE ("-Wunused-but-set-variable") # endif +# if __GNUC__ >= 13 +# define DIAGNOSTIC_IGNORE_SELF_MOVE DIAGNOSTIC_IGNORE ("-Wself-move") +# endif + /* GCC 4.8's "diagnostic push/pop" seems broken when using this, -Wswitch remains enabled at the error level even after a pop. Therefore, don't use it for GCC < 5. */