From tlumley@u.washington.edu  Tue Jul  9 21:12:12 2002
From: tlumley@u.washington.edu (Thomas Lumley)
Date: Tue, 9 Jul 2002 13:12:12 -0700 (PDT)
Subject: compilation breaks with gnome support on hp-ux 11.00 (PR#1757)
In-Reply-To: <20020709212956.23b2dd19.rjvbertin@hotmail.com>
Message-ID: <Pine.A41.4.44.0207091308440.19706-100000@homer13.u.washington.edu>

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.

	-thomas

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


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