mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2026-01-28 01:47:21 +01:00
Omit semicolons after _Pragma directives (#2780)
These are not statements and shouldn't be terminated by semicolons; in newer versions of Clang separating these by semicolons results in a build error. We can also further simplify `remove_volatile_cast` by using the comma operator and avoiding the reliance on non-standard GNU extensions.
This commit is contained in:
parent
9ecafe71d1
commit
1cc19a2130
1 changed files with 2 additions and 2 deletions
|
|
@ -372,8 +372,8 @@ bool spin_lock_is_claimed(uint lock_num);
|
|||
#define remove_volatile_cast(t, x) (t)(x)
|
||||
#define remove_volatile_cast_no_barrier(t, x) (t)(x)
|
||||
#else
|
||||
#define remove_volatile_cast(t, x) ({__compiler_memory_barrier(); Clang_Pragma("clang diagnostic push"); Clang_Pragma("clang diagnostic ignored \"-Wcast-qual\""); (t)(x); Clang_Pragma("clang diagnostic pop"); })
|
||||
#define remove_volatile_cast_no_barrier(t, x) ({ Clang_Pragma("clang diagnostic push"); Clang_Pragma("clang diagnostic ignored \"-Wcast-qual\""); (t)(x); Clang_Pragma("clang diagnostic pop"); })
|
||||
#define remove_volatile_cast(t, x) (__compiler_memory_barrier(), Clang_Pragma("clang diagnostic push") Clang_Pragma("clang diagnostic ignored \"-Wcast-qual\"") (t)(x) Clang_Pragma("clang diagnostic pop"))
|
||||
#define remove_volatile_cast_no_barrier(t, x) Clang_Pragma("clang diagnostic push") Clang_Pragma("clang diagnostic ignored \"-Wcast-qual\"") (t)(x) Clang_Pragma("clang diagnostic pop")
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue