Subject: Re: . in printf
To: None <current-users@NetBSD.ORG>
From: der Mouse <mouse@Holo.Rodents.Montreal.QC.CA>
List: current-users
Date: 12/03/1996 10:51:05
> Does anybody know why when you use the following statement in a C
> program gcc does not generate any code and does not return any error
> code:
> printf("test: %d".number);
> ^
Such is not my experience. On a slightly-pre-1.2 NetBSD/sparc machine,
[Callisto] 35> cat z.c
#include <stdio.h>
#include <unistd.h>
int main(void);
int main(void)
{
int number;
number = getpid();
printf("test: %d".number);
return(0);
}
[Callisto] 36> gcc -S z.c ; echo $status
z.c: In function `main':
z.c:10: request for member `number' in something not a structure or union
1
[Callisto] 37> gcc --version
2.7.2
[Callisto] 38>
der Mouse
mouse@rodents.montreal.qc.ca
7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B