Skip to content

Turn AIS_WARN_UNSAFE_BUFFER_OPS on by default#90

Merged
derobins merged 2 commits into
developfrom
derobins/turn_unsafe_buffer_ops_on
Nov 25, 2025
Merged

Turn AIS_WARN_UNSAFE_BUFFER_OPS on by default#90
derobins merged 2 commits into
developfrom
derobins/turn_unsafe_buffer_ops_on

Conversation

@derobins
Copy link
Copy Markdown
Collaborator

This affects clang/llvm C++ only. We currently raise no warnings with this switched on. If it becomes problematic in the future, we can switch it back off, but it's useful to turn on to encourage developers to find other solutions if this raises warnings.

This is only turned on by default w/ clang. For gcc, it remains off since it's not useful. It will now emit a FATAL_ERROR if enabled with gcc.

This affects clang/llvm C++ only. We currently raise no warnings
with this switched on. If it becomes problematic in the future, we
can switch it back off, but it's useful to turn on to encourage
developers to find other solutions if this raises warnings.

This is only turned on by default w/ clang. For gcc, it remains
off since it's not useful. It will now emit a FATAL_ERROR if
enabled with gcc.
Copilot AI review requested due to automatic review settings November 25, 2025 05:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enables unsafe buffer operation warnings by default for Clang/LLVM C++ compilers while keeping them disabled for GCC. The change aims to proactively catch unsafe buffer usage patterns during development.

Key Changes:

  • Set AIS_WARN_UNSAFE_BUFFER_OPS to ON by default for Clang compilers
  • Add validation to prevent enabling the option with non-Clang compilers
  • Update documentation to reflect the new default setting

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
cmake/AISClangSafeBuffers.cmake Add compiler detection logic to set default option value and validate compiler compatibility
INSTALL.md Document the new default ON state for the buffer safety option

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread INSTALL.md Outdated
@derobins derobins merged commit bd15dbb into develop Nov 25, 2025
32 checks passed
@derobins derobins deleted the derobins/turn_unsafe_buffer_ops_on branch November 25, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants