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: 103376,42dee056ce900ae6 X-Google-Attributes: gid103376,public From: kenner@lab.ultra.nyu.edu (Richard Kenner) Subject: Re: C's register keyword Date: 1997/09/10 Message-ID: <5v4u97$nrg$1@news.nyu.edu>#1/1 X-Deja-AN: 271160805 References: <5uqhm2$t48$1@goanna.cs.rmit.edu.au> <34111A70.2158@online.no> Organization: New York University Ultracomputer Research Lab Newsgroups: comp.lang.ada Date: 1997-09-10T00:00:00+00:00 List-Id: In article <34111A70.2158@online.no> tarjei@online.no writes: >If you think the register keyword is sacred in C, read the GCC manual. >If my memory serves me right they say that they ignore it or strongly >dissaprove of its use. No. The "register" keyword has precisely one semantic meaning in C, which is to make it an error to take the address of an object with the keyword. In other words, it is precisely the opposite of "aliased" in Ada. GCC correctly implements this keyword. It also has a historical aspect of suggestign which variables get placed into registers. Like all modern compilers, GCC ignores this purpose for the keyword if optimizing, but does use it as a guide when not optimizing.