On 7 October 2014 18:27, Álvaro Jurado wrote:
>
> , and ld could not assign right the values if declarations are not
> specified ansi style (variable initialization it's made by ld, not by the
> compiler): you will get some dragons in some cases.
Initialisations of externals is done by the comp
I'm using gcc to compile plan9 code from some time (4.7/4.8) and that
option are masking real behaviour. Do not warns or put out an error about
"anonymous structs", but you will have a conflict if to structs in the same
source are including a, for example, "Lock;" element, and ld could not
assign r
> Otherwise, your change is fine, but "hdr" would probably be
> a better name than "Biobufhdr". Also, don't forget to update
> your code to use b->hdr.fid instead of b->fid, and so on.
Thanks for all answers!
(They also helped to find a short documentation in /sys/doc/compiler)
Carsten
> in bio.h there is a
>
> struct Biobuf
> {
> Biobufhdr;
> uchar b[Bungetsize+Bsize];
> };
>
> where Biobufhdr is declared as
>
> typedef struct Biobufhdr Biobufhdr;
This is an unnamed structure. Recent versions of GCC
should be able to handle them when setting the
-fplan
hi,
no, it is an anonym field. and it is used in a way that is not part
of ansi c. there is an extension in newer versions of gcc which
supports it, but if you wan't to port plan 9 c to unix you can use the
libs from plan9port. that's far more easier.
bence
2014-10-07 17:24 GMT+02:00 Carsten