Skip to content

Comments

Add disabled-optimization and pointer-arith to compiler warnings#29622

Closed
mbroz wants to merge 1 commit intoopenssl:masterfrom
mbroz:warnings-1809
Closed

Add disabled-optimization and pointer-arith to compiler warnings#29622
mbroz wants to merge 1 commit intoopenssl:masterfrom
mbroz:warnings-1809

Conversation

@mbroz
Copy link
Member

@mbroz mbroz commented Jan 13, 2026

Another trivia:

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: openssl/project#1809

p.s.
note to myself: to check what is in -Wall and -Wextra for gcc, use gcc -Wall -Wextra -Q --help=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: openssl/project#1809

Signed-off-by: Milan Broz <[email protected]>
@t8m t8m added branch: master Applies to master branch approval: review pending This pull request needs review by a committer triaged: feature The issue/pr requests/adds a feature tests: exempted The PR is exempt from requirements for testing labels Jan 13, 2026
@esyr esyr added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Jan 13, 2026
Copy link
Contributor

@jogme jogme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, if tests pass

@petrovr
Copy link

petrovr commented Jan 13, 2026 via email

@mbroz
Copy link
Member Author

mbroz commented Jan 13, 2026

This warning is also enabled by -Wpedantic.

Right, missed that. But so are some other warnings in Configure (like switch or sign-compare). I would keep it as it is for now (as there will be more additions) and maybe later clean it - but it needs verification for all older compilers in CI.

@openssl-machine
Copy link
Collaborator

24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually.

@jogme jogme added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels Jan 15, 2026
openssl-machine pushed a commit that referenced this pull request Jan 15, 2026
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: openssl/project#1809

Signed-off-by: Milan Broz <[email protected]>

Reviewed-by: Eugene Syromiatnikov <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Norbert Pocs <[email protected]>
Reviewed-by: Saša Nedvědický <[email protected]>
MergeDate: Thu Jan 15 16:16:40 2026
(Merged from #29622)
@Sashan
Copy link
Contributor

Sashan commented Jan 15, 2026

the change made it to master branch as commit f99eff70557

thanks.

@Sashan Sashan closed this Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Applies to master branch tests: exempted The PR is exempt from requirements for testing triaged: feature The issue/pr requests/adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable non-problematic warnings

8 participants