Messages in this thread | | | Date | Mon, 31 Jan 2000 08:11:11 +0100 | From | almesber@lrc ... | Subject | Re: [PATCH] 2.3.41 - cleanup file_operations structs |
| |
James Manning wrote: > As it stands, gcc 2.7.2.3 is still our baseline compiler so I'd rather > keep things compatible with that my design, not by #ifdef.
$ cat z.c #include <stdio.h>
struct foo { int a,b; } bar = { .a = 5, .b = 7, };
int main(void) { printf("%d %d\n",bar.a,bar.b); return 0; }
$ gcc -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/specs gcc version 2.7.2.3 $ gcc -Wall -ansi z.c $ ./a.out 5 7 $ gcc -Wall -ansi -pedantic z.c z.c:7: warning: ANSI C forbids specifying structure member to initialize z.c:8: warning: ANSI C forbids specifying structure member to initialize
(Ditto with a gcc 2.7.2.1 that was built in '96.)
Not too bad, if you ask me.
- Werner
-- _________________________________________________________________________ / Werner Almesberger, ICA, EPFL, CH werner.almesberger@ica.epfl.ch / /_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |