From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9adfbb907494972e X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,9adfbb907494972e X-Google-Attributes: gid1014db,public From: seebs@solutions.solon.com (Peter Seebach) Subject: Re: Ada to C/C++ translator needed Date: 1996/10/08 Message-ID: <53fao2$t14@solutions.solon.com>#1/1 X-Deja-AN: 188076646 references: <32499FA0.4B5E@magic.fr> <52feul$os2@goanna.cs.rmit.edu.au> <844636753snz@genesis.demon.co.uk> organization: Usenet Fact Police (Undercover) reply-to: seebs@solon.com newsgroups: comp.lang.c,comp.lang.ada Date: 1996-10-08T00:00:00+00:00 List-Id: In article <844636753snz@genesis.demon.co.uk>, Lawrence Kirby wrote: >In article > tanmoy@qcd.lanl.gov "Tanmoy Bhattacharya" writes: >>Not quite. It is still not allowed to violate constraints (This came >>up in the discussion about `char a[1?1:(0,0)]' or some such >>meaningless example in comp.std.c). j++ in a constant expression is a >>violation of a constraint and must be diagnosed. >I'm sure you're right but which constraint does it violate? 6.4 says that constant expressions *must not contain* certain operators, including increment, decrement, comma, function call, and my memory fails to suggest the others. (And some section requires array sizes, and another requires initializers for static objects, to be constants.) -s -- Peter Seebach - seebs@solon.com - Copyright 1996 - http://www.solon.com/~seebs Unix/C Wizard - send mail for help, or send money for consulting! The *other* C FAQ, the hacker FAQ, et al. See web page above. Unsolicited email (junk mail and ads) is unwelcome, and will be billed for.