Add disabled-optimization and pointer-arith to compiler warnings

These flags seems not to be part of -Wextra, but looks like
could be useful in CI. According to gcc man page:

 disabled-optimization
  Warn if a requested optimization pass is disabled.

 pointer-arith
  Warn about anything that depends on the "size of" a function
  type or of "void".

Fixes: https://github.com/openssl/project/issues/1809

Signed-off-by: Milan Broz <gmazyland@gmail.com>

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Thu Jan 15 16:16:40 2026
(Merged from https://github.com/openssl/openssl/pull/29622)
This commit is contained in:
Milan Broz
2026-01-13 14:16:11 +01:00
committed by Alexandr Nedvedicky
parent e57f7941af
commit f99eff7055

View File

@@ -181,6 +181,8 @@ my @gcc_devteam_warn = qw(
-Werror
-Wmissing-prototypes
-Wstrict-prototypes
-Wdisabled-optimization
-Wpointer-arith
);
# These are used in addition to $gcc_devteam_warn when the compiler is clang.