comp.lang.ada
 help / color / mirror / Atom feed
From: kenner@lab.ultra.nyu.edu (Richard Kenner)
Subject: Re: C's register keyword
Date: 1997/09/10
Date: 1997-09-10T00:00:00+00:00	[thread overview]
Message-ID: <5v4u97$nrg$1@news.nyu.edu> (raw)
In-Reply-To: 34111A70.2158@online.no


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.




  reply	other threads:[~1997-09-10  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-06  0:00 C's register keyword Tristan Ludowyk
1997-09-06  0:00 ` Tarjei T. Jensen
1997-09-10  0:00   ` Richard Kenner [this message]
1997-09-08  0:00 ` Tucker Taft
1997-09-08  0:00   ` David Weller
1997-09-09  0:00     ` Fergus Henderson
1997-09-11  0:00       ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox