Re: gettext.h patch for portability to sunCC, pgCC, RHEL AS 4 g++

2006-10-25 Thread Bruno Haible
Paul Eggert wrote: > Like Ben Pfaff, I don't understand the assertion that ISO > C++ supports variable-length arrays. Indeed, ISO C++ does not support variable-length arrays. Sorry for the wrong statement. > I just now checked the 2005-10-19 working draft >

Re: gettext.h patch for portability to sunCC, pgCC, RHEL AS 4 g++

2006-10-25 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: + /* 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 &&

Re: [bug-gnulib] gettext.h patch for portability to sunCC, pgCC, RHEL AS 4 g++

2006-10-25 Thread Bruno Haible
Ben Pfaff wrote: > I don't understand this assertion that ISO C++ supports > variable-size arrays. ISO C++98 shows the expression in an > array-declarator to be a constant-expression You're right. I was confused. It's only some specific C++ compilers (such as g++) which do support variable-size a

Re: gettext.h patch for portability to sunCC, pgCC, RHEL AS 4 g++

2006-10-25 Thread Ben Pfaff
Bruno Haible <[EMAIL PROTECTED]> writes: > + /* 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. */ I don't understand this assertion that ISO C++ supports variable-size arrays. ISO C++98 sho

Re: gettext.h patch for portability to sunCC, pgCC, RHEL AS 4 g++

2006-10-25 Thread Bruno Haible
Paul Eggert wrote: > However, gettext.h does attempt to be portable to C++, so the problems > you found there suggest that a fix is needed. It currently does this: > > #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ > (__GNUC__ >= 3 || defined __cplusplus) > > but (as you've found) older C

gettext.h patch for portability to sunCC, pgCC, RHEL AS 4 g++

2006-10-24 Thread Paul Eggert
[EMAIL PROTECTED] (Karl Berry) writes: > Is supporting compilation with C++ of interest? Not in general. Coreutils, for example, generates about 400 lines worth of diagnostics when compiled using g++ 4.1.1. This explains the quotearg problems you mentioned: quotearg doesn't attempt to be portab