Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
 4.1.99
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gcc.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 Google, Inc.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_TESTSUITE_INCLUDE_TEST_TOOLCHAIN_GCC_H_
8#define ZEPHYR_TESTSUITE_INCLUDE_TEST_TOOLCHAIN_GCC_H_
9
10#ifndef ZEPHYR_TESTSUITE_INCLUDE_TEST_TOOLCHAIN_H_
11#error "Please do not include test toolchain-specific headers directly, \
12use <zephyr/test_toolchain.h> instead"
13#endif
14
15#define TOOLCHAIN_WARNING_DANGLING_POINTER "-Wdangling-pointer"
16#define TOOLCHAIN_WARNING_FORMAT_TRUNCATION "-Wformat-truncation"
17#define TOOLCHAIN_WARNING_INFINITE_RECURSION "-Winfinite-recursion"
18#define TOOLCHAIN_WARNING_OVERFLOW "-Woverflow"
19#define TOOLCHAIN_WARNING_PRAGMAS "-Wpragmas"
20#define TOOLCHAIN_WARNING_UNUSED_FUNCTION "-Wunused-function"
21
22/* GCC-specific warnings that aren't in clang. */
23#if defined(__GNUC__) && !defined(__clang__)
24#define TOOLCHAIN_WARNING_ALLOC_SIZE_LARGER_THAN "-Walloc-size-larger-than="
25#define TOOLCHAIN_WARNING_STRINGOP_OVERFLOW "-Wstringop-overflow"
26#define TOOLCHAIN_WARNING_STRINGOP_TRUNCATION "-Wstringop-truncation"
27#endif
28
29#endif