[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: auto struct init (was: Re: BeOS PPC Compilation Fixes)

From: Joe Orton <joe_at_light.plus.com>
Date: 2000-12-03 12:06:05 CET

On Sun, Dec 03, 2000 at 02:38:40AM -0800, Greg Stein wrote:
> The above code is "supposed" to be legal. However, I seem to recall the
> HP/UX compiler having an issue with it, too (saw it with a mod_dav report a
> long while back).

IIRC "run-time" structure initialization is a GCC-ism... on IRIX 6.2:

int foo = 1;

int main() {
        struct bar {
                int aga;
        } norman = { foo };

        return 0;
}

% cc -n32 -c foo.c
"foo.c", line 7: error(1028): expression must have a constant value
        } norman = { foo };
Received on Sat Oct 21 14:36:16 2006

This is an archived mail posted to the Subversion Dev mailing list.