Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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
1 change: 1 addition & 0 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ C23 Feature Support

- Clang now supports `N3029 <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3029.htm>`_ Improved Normal Enumerations.
- Clang now officially supports `N3030 <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3030.htm>`_ Enhancements to Enumerations. Clang already supported it as an extension, so there were no changes to compiler behavior.
- Extend clang's <limits.h> to define *LONG_LONG*_ macros for Android's bionic.

Non-comprehensive list of changes in this release
-------------------------------------------------
Expand Down
9 changes: 5 additions & 4 deletions clang/lib/Headers/limits.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,12 @@
#define ULLONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL)
#endif

/* LONG_LONG_MIN/LONG_LONG_MAX/ULONG_LONG_MAX are a GNU extension. It's too bad
that we don't have something like #pragma poison that could be used to
deprecate a macro - the code should just use LLONG_MAX and friends.
/* LONG_LONG_MIN/LONG_LONG_MAX/ULONG_LONG_MAX are a GNU extension. Android's
bionic also defines them. It's too bad that we don't have something like
#pragma poison that could be used to deprecate a macro - the code should just
use LLONG_MAX and friends.
*/
#if defined(__GNU_LIBRARY__) ? defined(__USE_GNU) : !defined(__STRICT_ANSI__)
#if (defined(__GNU_LIBRARY__) ? defined(__USE_GNU) : !defined(__STRICT_ANSI__)) || defined(__BIONIC__)

#undef LONG_LONG_MIN
#undef LONG_LONG_MAX
Expand Down
3 changes: 3 additions & 0 deletions clang/test/Headers/limits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
// RUN: %clang_cc1 -std=c17 -ffreestanding -fsyntax-only -verify -x c %s
// RUN: %clang_cc1 -std=c2x -ffreestanding -fsyntax-only -verify -x c %s

// Specifically test arm64 linux platforms.
// RUN: %clang_cc1 -triple arm64-linux -ffreestanding -fsyntax-only -verify -x c %s

// Specifically test 16-bit int platforms.
// RUN: %clang_cc1 -triple=avr -ffreestanding -fsyntax-only -verify -x c %s
// RUN: %clang_cc1 -triple=avr -std=c++11 -ffreestanding -fsyntax-only -verify %s
Expand Down
Loading