Date: Wed, 26 Feb 1997 18:43:54 +0200 (IST) From: Eli Zaretskii To: David Jenkins cc: djgpp AT delorie DOT com Subject: Re: register int variable Errors In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.