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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,df854b5838c3e14 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,df854b5838c3e14 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,df854b5838c3e14 X-Google-Attributes: gid103376,public From: seebs@solutions.solon.com (Peter Seebach) Subject: Re: C/C++ knocks the crap out of Ada Date: 1996/03/19 Message-ID: <4in989$j13@solutions.solon.com>#1/1 X-Deja-AN: 143130779 references: <00001a73+00002504@msn.com> <4ia41k$e04@solutions.solon.com> <1996Mar19.175606.5918@nosc.mil> organization: Usenet Fact Police (Undercover) newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ Date: 1996-03-19T00:00:00+00:00 List-Id: In article <1996Mar19.175606.5918@nosc.mil>, Charles H. Sampson wrote: >In article <4ia41k$e04@solutions.solon.com>, >Peter Seebach wrote: >>To be specific, C compilers are required to tell you about *some* >>inconsistencies. There's a clever trick with externs that lets you get >>this checking, and have the diagnostic be required. > I know I'm showing my ignorance of vanilla flavored C, but I find >this a surprising statement. C compilers are _required_ to tell the >user something and there's a clever trick to get the C compiler to do >what it's required to do. Is this a meaning of _required_ that I'm not >aware of? No. It's like this; C compilers are required to detect conflicting definitions. If you maintain version information in files of the sort that a C compiler will detect if it is in conflict, you can cause the C compiler's required diagnostics to apply to your files, as long as the versioning info is maintained. Not as good as "real" versioning, but cheap. :) > I can understand a command line switch that affects this required >reporting, although my preferred implementation would be to get the mes- >sages by default and use the switch to suppress them. However, to have >to use a trick to obtain required behaviour seems bizarre, even for the >C world. Can you elaborate? Sure. Basically, you provide version based definitions, so any conflict will cause a diagnostic. -s -- Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach. C/Unix wizard -- C/Unix questions? Send mail for help. No, really! FUCK the communications decency act. Goddamned government. [literally.] The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html