1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-15 17:43:51 +01:00

13 Commits

Author SHA1 Message Date
Marian Buschsieweke
bd43254702
core: use SPDX copyright tags
Co-authored-by: crasbe <crasbe@gmail.com>
2025-11-23 21:07:35 +01:00
Marian Buschsieweke
0998112524
core/lib/compiler_hints: Make NONSTRING CLANG compatible
Starting from clang 21 (see [release notes][1]) clang also supports
`-Wunterminated-string-initialization` and the corresponding
`__attribute__((nonstring))`. Hence, also provide `NONSTRING` as the
corresponding `__attribute__((nonstring))` for clang starting with
clang version 21.

[1]: https://releases.llvm.org/21.1.0/tools/clang/docs/ReleaseNotes.html
2025-11-16 21:06:21 +01:00
Marian Buschsieweke
0b01fa0025
core/compiler_hints: Add NONSTRING attribute
This adds the `NONSTRING` attribute that is defined as either
`__attribute__((nonstring))` or as empty, depending on whether the
toolchain understands the `nonstring` attribute.

This allows declaring char arrays as not being a zero-terminated
c-string without cluttering the code with preprocessor conditinational
to ensure backward compatibility with compilers that do not support
`-Wunterminated-string-initialization` yet.
2025-04-27 22:49:22 +02:00
Marian Buschsieweke
914429c5f5
core/lib/include/compiler_hints.h: fix style
This adds indent to make reading preprocessor conditionals easier, as
is recommended by our coding convention.
2025-04-27 22:49:22 +02:00
JerelJr
04dafd5618 core: replace header guards with #pragma once
core/lib/include/ringbuffer.h: removed trailing newline

core/lib/include/irq.h: restored header guard for irq.h to resolve build errors

core/lib/include/irq.h: added trailing newline to irq.h
2025-04-15 14:55:38 -04:00
Benjamin Valentin
0ee46e8d42 core/compiler_hints: add may_be_zero() 2023-05-23 17:46:39 +02:00
Benjamin Valentin
a5bc1b3722 core/compiler_hints: fix detection of __builtin_unreachable() 2023-04-27 16:15:16 +02:00
Benjamin Valentin
c1f63cafa8 core/compiler_hints: add assume() hint 2023-03-06 20:22:39 +01:00
Teufelchen1
a8c9af901c core/xfa: disable asan on llvm 2023-02-15 17:41:35 +01:00
Benjamin Valentin
75f666f6b3 core/compiler_hints: add likely() / unlikely() hints 2023-01-18 01:17:31 +01:00
Karl Fessel
b4feefa334 core/lib: define MAYBE_UNUSED 2022-11-17 12:26:35 +01:00
Karl Fessel
fe325ecdd2 core/lib: compiler_hints guard NORETURN and PURE 2022-11-17 12:26:35 +01:00
Karl Fessel
045bd7a1a2 core/lib: split kernel defines by its concerns 2022-11-11 13:41:33 +01:00