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: 10a146,a03ae7f4e53958e1 X-Google-Attributes: gid10a146,public X-Google-Thread: fac41,a03ae7f4e53958e1 X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,8775b19e3c68a5dc X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,a03ae7f4e53958e1 X-Google-Attributes: gid109fba,public X-Google-Thread: fa0ae,a03ae7f4e53958e1 X-Google-Attributes: gidfa0ae,public X-Google-Thread: 114809,a03ae7f4e53958e1 X-Google-Attributes: gid114809,public X-Google-Thread: 1094ba,a03ae7f4e53958e1 X-Google-Attributes: gid1094ba,public X-Google-Thread: 1014db,a03ae7f4e53958e1 X-Google-Attributes: gid1014db,public From: watzka@stat.uni-muenchen.de (Kurt Watzka) Subject: Re: Which language pays most 17457 -- C++ vs. Java? Date: 1997/12/25 Message-ID: <67uch7$jhu$1@sparcserver.lrz-muenchen.de>#1/1 X-Deja-AN: 310198380 References: <199712121931.LAA25389@sirius.infonex.com> <349B0417.D4DB6A30@its.cl> <67gvpa$m3t$1@brie.direct.ca> <67iipp$ktj$1@darla.visi.com> <882756127snz@genesis.demon.co.uk> <34A14C27.57C0@min.net> Reply-To: watzka@stat.uni-muenchen.de Distribution: world Organization: Institut fuer Statistik der LMU Muenchen (Germany) Newsgroups: comp.lang.fortran,comp.lang.c,comp.lang.c++,comp.lang.eiffel,comp.lang.java.programmer,comp.lang.smalltalk,comp.lang.perl.misc,comp.lang.ada,comp.edu Date: 1997-12-25T00:00:00+00:00 List-Id: John Porter writes: >Lawrence Kirby wrote: >> >> Aren't the standard library identifiers with external linkage reserved >> even in a freestandinhg environment? >With the possible exception of environments for embedded development, >the identifiers defined in the standard or any other library are not >reserved words. Would you mind telling the ISO about this observation of yours, so that the language definition can be adapted to your views? They erronously claim the identifiers of functions defined in the library clause as reserved words for identifiers with external linkage. >If I don't include string.h, I am free to use the >id 'memcpy' for my own purposes. No, since memcpy is not listed as an identifier with file scope. Only for identifiers with file scope that do _not_ have external linkage the reservation is limited to compilation units that include one of the associated headers. Even if I do link with a library which >defines memcpy, my definition overrides it. No, the behaviour of such a program is undefined. I see no other possible interpretation of "If the program declares or defines an identifier with the same name as an identifier reserved in that context (*) the behaviour is undefined. (*) denotes a cross reference that says: Provided that a library function can be declared without reference to any type defined in a header, it is also permissible to declare the function, either explicitly or implicitly, and use it without including its associated header. I'm not sure how you can >construe this to mean that 'memcpy' is in any way "reserved". I'm not sure how you can think that it is not reserved after reading this thread. The question is whether it is reserved in a freestanding environment, and the answer from the language definition is "no, it is not", as far as I understand the language definition. In a hosted environment, it is reserved through rather explicit verbiage in the language definition, and the behaviour of programs using reserved identifiers in a context in which they are reserved, is _explicitly declared undefined. Kurt -- | Kurt Watzka Phone : +49-89-2178-2781 | watzka@stat.uni-muenchen.de