Mail Archives: djgpp/1997/02/26/11:56:35
On Wed, 26 Feb 1997, David Jenkins wrote:
> Yet when I change
> int d;
>
> to
>
> register int d;
>
> DJGPP gives the error "register name not specified for 'd'
Is `d' a global variable? In other words, is it declared outside of any
function? If so, then you are using a GCC extension to ANSI C: the
Standard doesn't allow global variables to be declared with a register
qualifier. GCC allows this, but it assumes that you mean to put that
variable in a specific register, for purposes known to you (otherwise it
makes no sense to put a global variable into a register, especially on a
x86 CPU that has way too few registers to spare).
If the above is not your case, please post the shortest program (not a
fragment) that triggers the error message.
- Raw text -