compilation breaks with gnome support on hp-ux 11.00 (PR#1757)

Thomas Lumley
Tue, 9 Jul 2002 13:12:12 -0700 (PDT)

On Tue, 9 Jul 2002, RenE J.V. Bertin wrote:

> > Hmm:
> >
> > const gint bufsize = 2048;
> > gchar buf[bufsize];
> >
> > is the culprit, so a quick fix should be obvious (just use #define
> > instead). But is this usage of "const" variables an un-ANSI C
> > extension in GCC, or is it the HP C compiler that is to blame??
> Peter (and others):
> AFAIK, gcc is the only C compiler that allows this sort of fortran-like
> syntax. Mighty handy, but not portable at all.

Variable-length arrays aren't that unpopular an extension.  They are in
the Sun Workshop compiler, for example.

However in this case there *isn't* a variable-length array, it's just a
fixed length array declared by someone who didn't realise that a const
variable isn't a constant expression.


r-devel mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: