Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Upgrading C++Builder 12.2: Tip #4 1/2: Check out compiler safety options

Splash image for Upgrading to C++Builder 122 Tips Tricks 4 12 Check out compiler safety options

Screenshot Radically Different Why C++Builder 122 Matters webinarWelcome to a series of tips and tricks for taking advantage of the new Windows 64-bit Modern toolchain in C++Builder / RAD Studio 12.2! This builds on a webinar we did sharing a bunch of useful information on why and how the new C++Builder matters to you, where this was the very end (so go watch the start!)

Tip #4 1/2: Check out compiler safety options

Did tip 4 worry you? It shouldn’t, because it was really a tool to improve your code. But here’s a tip that’s the other way around: compiler settings to use to make your code safer.

You can find all these on these two fantastic resources:

  1. Compiler Options Hardening Guide for C and C++
    by the Open Source Security Foundation (OpenSSF) Best Practices Working Group
  2. Leveraging Your Toolchain to Improve Security
    by Phillip Johnston

Both these cover multiple compilers and standard libraries. Check for the flags that apply to Clang, version <= 15, and to libc++ version <= 15, which is LLVM’s STL and the one we use. (Flags for versions 16-18 are not yet applicable but will be in future.) There are some great flags there that will make your code better — and that you can use with the new C++Builder 12.2 and it’s Windows 64-bit Modern C++ toolchain.

Exit mobile version