On Mon, Jun 23, 2008 at 11:27:39AM +0200, Michael Kerrisk wrote:
[...]
> > Also, the %as GNU extension seems not to be documented
> > (it may return ENOMEM) in the man page. It is in the glibc
> > documentation.
>
> Have you tried using this? I'm trying to test now, but gcc complains
> that '%a' expects type 'float *'.
[...]
~$ cat a.c
#include <stdio.h>
int main(int argc, char **argv)
{
char *a;
sscanf(argv[1], "%as", &a);
puts(a);
return 0;
}
~$ cc -Wall -c a.c
~$ ./a "xx yy"
xx
~$ gcc-2.95 -Wall -c a.c
~$ gcc-3.3 -Wall -c a.c
~$ gcc-3.4 -Wall -c a.c
~$ gcc-4.1 -Wall -c a.c
~$ gcc-4.2 -Wall -c a.c
~$ gcc-4.3 -Wall -c a.c
~$
Seems OK.
Maybe you had "%a" instead of "%as"?
--
Stéphane
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]