This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Possible bug in egcs-1.1b?
- To: Linux Egcs <egcs at cygnus dot com>
- Subject: Possible bug in egcs-1.1b?
- From: Alex Buell <alex dot buell at tahallah dot demon dot co dot uk>
- Date: Sun, 27 Sep 1998 09:50:38 -0400 (EDT)
- Reply-To: alex dot buell at tahallah dot demon dot co dot uk
Guys, I ran into a problem with egcs whilst attempting to build
ltrace-0.3.6.
I am not sure if the struct definition is correct though, but common sense
would dictate that it is. This is with egcs-1.1b, glibc-2.0.96 (checked
and the header definitions for the option struct is identical to that of
glibc-2.0.4, so can't be the problem).
Here's a short test program that replicates the problem:
#include <getopt.h>
int main(void)
{
static struct option wibble[] = {
{ "align", 1, 0, 'a'},
{ "debug", 0, 0, 'd'},
{ "demangle", 0, 0, 'C'},
{ "help", 0, 0, 'h'},
{ "output", 1, 0, 'o'},
{ "version", 0, 0, 'V'},
{ 0, 0, 0, 0}
};
}
And this is the output from the compiler:
getopt_test.c: In function `main':
getopt_test.c:12: elements of array `wibble' have incomplete type
getopt_test.c:13: warning: excess elements in struct initializer after `wibble[0]'
getopt_test.c:13: warning: excess elements in struct initializer after `wibble[0]'
getopt_test.c:13: warning: excess elements in struct initializer after `wibble[0]'
getopt_test.c:13: warning: excess elements in struct initializer after `wibble[0]'
getopt_test.c:14: warning: excess elements in struct initializer after `wibble[1]'
getopt_test.c:14: warning: excess elements in struct initializer after `wibble[1]'
getopt_test.c:14: warning: excess elements in struct initializer after `wibble[1]'
getopt_test.c:14: warning: excess elements in struct initializer after `wibble[1]'
getopt_test.c:15: warning: excess elements in struct initializer after `wibble[2]'
getopt_test.c:15: warning: excess elements in struct initializer after `wibble[2]'
getopt_test.c:15: warning: excess elements in struct initializer after `wibble[2]'
getopt_test.c:15: warning: excess elements in struct initializer after `wibble[2]'
getopt_test.c:16: warning: excess elements in struct initializer after `wibble[3]'
getopt_test.c:16: warning: excess elements in struct initializer after `wibble[3]'
getopt_test.c:16: warning: excess elements in struct initializer after `wibble[3]'
getopt_test.c:16: warning: excess elements in struct initializer after `wibble[3]'
getopt_test.c:17: warning: excess elements in struct initializer after `wibble[4]'
getopt_test.c:17: warning: excess elements in struct initializer after `wibble[4]'
getopt_test.c:17: warning: excess elements in struct initializer after `wibble[4]'
getopt_test.c:17: warning: excess elements in struct initializer after `wibble[4]'
getopt_test.c:18: warning: excess elements in struct initializer after `wibble[5]'
getopt_test.c:18: warning: excess elements in struct initializer after `wibble[5]'
getopt_test.c:18: warning: excess elements in struct initializer after `wibble[5]'
getopt_test.c:18: warning: excess elements in struct initializer after `wibble[5]'
getopt_test.c:19: warning: excess elements in struct initializer after `wibble[6]'
getopt_test.c:19: warning: excess elements in struct initializer after `wibble[6]'
getopt_test.c:19: warning: excess elements in struct initializer after `wibble[6]'
getopt_test.c:19: warning: excess elements in struct initializer after `wibble[6]'
getopt_test.c:20: invalid use of undefined type `struct option'
getopt_test.c:12: storage size of `wibble' isn't known
Cheers,
Alex
--
/\_/\ Legalise cannabis now!
( o.o ) Grow some cannabis today!
> ^ < Peace, Love, Unity and Respect to all.
http://www.tahallah.demon.co.uk - *new* - rewritten for text browser users!
Linux tahallah 2.1.122 #43 Sat Sep 19 10:54:36 EDT 1998 libc 2.0.96 One AMD 486 DX/4 processor, 49.77 total bogomips, 32M RAM