Register?

Tod Thomas tthomas@chubb.com
Fri Sep 22 11:07:00 GMT 2000


Using gcc 2.95.1 under Solaris 2.6 this code compiles fine:

int
main(int argc, char **argv, char *envp[])
{
register int sw;
}


But this doesn't:

register int sw;
int
main(int argc, char **argv, char *envp[])
{
}

producing this error:
register name not specified for `sw'

Is there something different about using a register as a global or am I
doing something stupid?

Thanks !


More information about the Gcc mailing list