From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,cb40752a27f3d651 X-Google-Attributes: gid1014db,public X-Google-Thread: fee84,cb40752a27f3d651 X-Google-Attributes: gidfee84,public X-Google-Thread: 1164f8,cb40752a27f3d651 X-Google-Attributes: gid1164f8,public From: Casper.Dik@Holland.Sun.Com (Casper H.S. Dik - Network Security Engineer) Subject: Re: comma operator: C compiler bug or bogus usage? Date: 1999/04/15 Message-ID: #1/1 X-Deja-AN: 466811441 References: <7f567v$sp1$1@news.iastate.edu> Mail-Copies-To: never Organization: Sun Microsystems, Netherlands Newsgroups: comp.lang.c,comp.unix.osf.osf1,comp.sys.dec [[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]] john@iastate.edu (John Hascall) writes: > Is the result of: > constant-expression comma-operator constant-expression > still a constant-expression or not? If not, why not (and it > seems to me this is the only operator with this property?) No. >John >PS, FWIW, gcc accepts both of these and produces the 'expected' results Well, if you pass -ansi -pedantic: gcc -ansi -pedantic x.c x.c:3: warning: ANSI C forbids variable-size array `foo' x.c:3: variable-size type declared outside of any function x.c:4: warning: ANSI C forbids variable-size array `bar' x.c:4: variable-size type declared outside of any function Casper -- Expressed in this posting are my opinions. They are in no way related to opinions held by my employer, Sun Microsystems. Statements on Sun products included here are not gospel and may be fiction rather than truth.