Hi,
I just tried to dissect the code you sent. I might be wrong also . I
think the register variables don't have any addresses they are stored in CPU
registers So I think the code is giving a segfault when you try to access
the address of the same ?
Correct me If I am wrong ?
I wrote an driver program to test your code snippet
//#include <string.h>
#include <stdio.h>
char * strcat(s, append)
register char *s;
register const char *append;
{
printf("IN FUNCTIOM\n");
printf("Strinfg is %s \n",s);
printf("Append is %s \n",append);
char *save = s;
printf("Alloted MEM \n");
for ( ;*s; ++s);
while (*s++ = *append++);
printf("Prior to return \n");
return(save);
}
main ()
{
char * str = NULL;
printf("HERE \n");
str=strcat("test","linux");
printf ("%s \n",str);
}
So I think you won't be able to use register storage class for your
variable.
For std strcat implementation
http://opengrok.creo.hu/dragonfly/xref/src/sys/libkern/strcat.c
For Info about storage classes in C/C++
http://www.phptr.com/articles/article.asp?p=31783&seqNum=4&rl=1
Regards....
.::abrar::.
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/NhFolB/TM
--------------------------------------------------------------------~->
=====================================================
To know more about TWINCLING Society
http://www.twincling.org/
OpenSSL - PKI & Digital Certificates
Mark your calendar for the TSM
Saturday 5pm on 15th July 2006
=====================================================
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/twincling/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/