DEV Community

Dobby33
Dobby33

Posted on

Answer: How to detect if building with address sanitizer when building with gcc 4.8?

From the GCC 4.8.0 manual:

__SANITIZE_ADDRESS__

This macro is defined, with value 1, when -fsanitize=address is in use.

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay