mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
Merge branch 'fix/nonstring_attr_declaration_v6.0' into 'release/v6.0'
fix(esp_common): detect nonstring attribute with __has_attribute (v6.0) See merge request espressif/esp-idf!52626
This commit is contained in:
@@ -165,10 +165,12 @@ extern "C" {
|
|||||||
// Forces to not inline function
|
// Forces to not inline function
|
||||||
#define NOINLINE_ATTR __attribute__((noinline))
|
#define NOINLINE_ATTR __attribute__((noinline))
|
||||||
|
|
||||||
#if !defined(__clang__) && __GNUC__ >= 15
|
#if defined(__has_attribute)
|
||||||
// Marks a character array as not null-terminated to avoid string-related optimizations or warnings
|
#if __has_attribute(nonstring)
|
||||||
#define NONSTRING_ATTR __attribute__ ((nonstring))
|
#define NONSTRING_ATTR __attribute__((nonstring))
|
||||||
#else
|
#endif
|
||||||
|
#endif
|
||||||
|
#ifndef NONSTRING_ATTR
|
||||||
#define NONSTRING_ATTR
|
#define NONSTRING_ATTR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user