From: Bruno Haible Date: Wed, 25 Oct 2006 13:14:37 +0000 (+0000) Subject: Some C++ compilers don't support variable-size arrays. X-Git-Tag: 0.16.x-branchpoint~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=353d8f8e26521ed178ff3977bfb80c1b7023a752;p=thirdparty%2Fgettext.git Some C++ compilers don't support variable-size arrays. --- diff --git a/gnulib-local/ChangeLog b/gnulib-local/ChangeLog index da11f2cb3..be4f35a06 100644 --- a/gnulib-local/ChangeLog +++ b/gnulib-local/ChangeLog @@ -2,6 +2,12 @@ * gettext-0.16 released. +2006-10-25 Bruno Haible + + * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to + false for PGI C++ and Sun C++ compilers. + Reported by Nelson H. F. Beebe . + 2006-10-24 Bruno Haible * modules/gettext-tools-misc (Makefile.am): Add also $(top_srcdir) to diff --git a/gnulib-local/lib/gettext.h b/gnulib-local/lib/gettext.h index 9acae729d..74b08f128 100644 --- a/gnulib-local/lib/gettext.h +++ b/gnulib-local/lib/gettext.h @@ -164,8 +164,12 @@ npgettext_aux (const char *domain, #include +/* GCC supports variable-size arrays in C and C++ mode. + ISO C++ supports variable-size arrays, but some older PGI and Sun compilers + don't. */ #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ - (__GNUC__ >= 3 || defined __cplusplus) + (__GNUC__ >= 3 \ + || (defined __cplusplus && !(defined __PGI || defined __SUNPRO_CC))) #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include