diff options
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/ucs.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d894655..809b8a4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,9 @@ 2019-12-20 Olivier Hainque <hainque@adacore.com> + + * testsuite/gcc.dg/cpp/ucs.c: Prevent redefinition + of WCHAR_MAX if already exposed by limits.h. + +2019-12-20 Olivier Hainque <hainque@adacore.com> Jerome Lambourg <lambourg@adacore.com> * c-c++-common/pr56493.c: Allow '$' in addition to '.' diff --git a/gcc/testsuite/gcc.dg/cpp/ucs.c b/gcc/testsuite/gcc.dg/cpp/ucs.c index cac83f3..f52cd57 100644 --- a/gcc/testsuite/gcc.dg/cpp/ucs.c +++ b/gcc/testsuite/gcc.dg/cpp/ucs.c @@ -16,6 +16,8 @@ #define short +2 #define long +3 +#if !defined(WCHAR_MAX) + #if __WCHAR_TYPE__ == 0 # define WCHAR_MAX INT_MAX #elif __WCHAR_TYPE__ == 1 @@ -28,6 +30,8 @@ # error wacky wchar_t #endif +#endif + #undef unsigned #undef int #undef char |