Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion include/rbs/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,13 @@
* Nullability annotations for pointer types.
* Clang supports _Nullable and _Nonnull to indicate whether a pointer may be NULL.
* On other compilers, these expand to nothing.
*
* They are Clang extensions, so a strict ISO C compilation rejects them with
* `-Wnullability-extension`, which is an error under `-pedantic-errors`. Expand
* them to nothing in that case, so that embedders compiling these headers with a
* conforming dialect (`-std=c99` and friends define `__STRICT_ANSI__`) still build.
*/
#ifdef __clang__
#if defined(__clang__) && !defined(__STRICT_ANSI__)
#define RBS_NULLABLE _Nullable
#define RBS_NONNULL _Nonnull
#else
Expand Down
Loading