This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
error using "struct"
- From: "Fernanda Capella" <fcapella at parks-se dot com dot br>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Mon, 7 Jul 2003 18:11:14 -0300
- Subject: error using "struct"
- Locasite-mail-scanner: (Email Liberado. Processado em 0.177969 segundos)
- Locasite-mail-scanner-mail-from: fcapella@parks-se.com.br via web
- Locasite-mail-scanner-rcpt-to: gcc-help@gcc.gnu.org
Hi!
I'm facing problems compilig a C program that uses struct. I made a very
simple code to show the error: "parse error before '.' token".
Any help would be very appreciated.
Thanks, Fernanda.
-------------------------------------------
//struct_test.c
typedef struct struct_test{
unsigned char byte1;
unsigned char byte2;
unsigned char byte3;
}first, second;
first.byte1=0x01;
second.byte2=0x02;
----------------------------------------------------
//The error message:
[root@ root]# gcc -c struct_test.c
struct_test.c:7: parse error before '.' token
//my GCC and Red Hat versions:
[root@ root]# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
Configured with:
../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix --disable-checking --host=i386-redha
t-linux --with-system-zlib --enable-__cxa_atexit
Thread model: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
[root@ root]#