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: fred@genesis.demon.co.uk (Lawrence Kirby) Subject: Re: Ada to C/C++ translator needed Date: 1996/10/05 Message-ID: <844550221snz@genesis.demon.co.uk>#1/1 X-Deja-AN: 187910431 x-nntp-posting-user: fred@genesis.demon.co.uk references: <32499FA0.4B5E@magic.fr> <52feul$os2@goanna.cs.rmit.edu.au> <01bbad6e$67743f20$32ee6fcf@timhome2> <52o1ve$gra@goanna.cs.rmit.edu.au> <52oorc$hid@solutions.solon.com> <52t8da$2ej@goanna.cs.rmit.edu.au> x-mail2news-path: news.demon.net!genesis.demon.co.uk organization: none reply-to: fred@genesis.demon.co.uk newsgroups: comp.lang.c,comp.lang.ada Date: 1996-10-05T00:00:00+00:00 List-Id: In article <52t8da$2ej@goanna.cs.rmit.edu.au> ok@goanna.cs.rmit.edu.au "Richard A. O'Keefe" writes: >seebs@solutions.solon.com (Peter Seebach) writes: > >>(However, if you're discussing SparcWorks C, you've failed to establish >>that it's a C compiler. A C compiler *MUST* diagnose the line >> static int i = 1 ? 1 : (++j); >>as a constraint violation, but at least the version we have doesn't, even >>in "maximally conforming ANSI mode". Clearly, it is not a C compiler.) > >"gub.c", line 1: undefined symbol: j > >Looks like an error message to me. >Oh, you wanted something _else_ in the program? > >Fair enough, given an appropriate declaration for j, >this line gets through > > SPARCompiler C, even with "-erroff=%none" > SPARCompiler Lint > LCLint (shock horror; I have reported this as a bug) > lcc (*published* as a C compiler!) > (I have reported this as a bug too) > gcc -ansi -pedantic (I'll let you report this one, seebs) > >Evidently, by your argument, I haven't _got_ any C compilers to test! Possibly, but you haven't proved it. You have to consider 6.4: "An implementation may accept other forms of constant expression" However I would certainly expect a lint to flag it as non-portable. -- ----------------------------------------- Lawrence Kirby | fred@genesis.demon.co.uk Wilts, England | 70734.126@compuserve.com -----------------------------------------