1.. _gcc:
2
3GCC static analysis support
4###########################
5
6Static analysis was introduced in `GCC <https://gcc.gnu.org/>`__ 10 and it is enabled
7with the option ``-fanalyzer``. This option performs a much more expensive and thorough
8analysis of the code than traditional warnings.
9
10Run GCC static analysis
11***********************
12
13To run GCC static analysis, :ref:`west build <west-building>` should be
14called with a ``-DZEPHYR_SCA_VARIANT=gcc`` parameter, e.g.
15
16.. code-block:: shell
17
18    west build -b qemu_x86 samples/userspace/hello_world_user -- -DZEPHYR_SCA_VARIANT=gcc
19