From: "Álvaro Jurado" <elbingmiss@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] C question on struct Biobuf in bio.h
Date: Tue, 7 Oct 2014 19:27:42 +0200 [thread overview]
Message-ID: <CAHJeKDVpgbn1f0jAn9egEKQwnmMLRR-QZ_D27t9pbdSYF5zOcw@mail.gmail.com> (raw)
In-Reply-To: <1959055281.1911186.1412697516384.JavaMail.ngmail@webmail14.arcor-online.net>
[-- Attachment #1: Type: text/plain, Size: 987 bytes --]
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 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.
Look at LP49 source code and you will see that authors used your second way.
Álvaro Jurado Cuevas
colmenar.biz.tm
2014-10-07 17:58 GMT+02:00 Carsten Kunze <carsten.kunze@arcor.de>:
> > 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
>
>
[-- Attachment #2: Type: text/html, Size: 1564 bytes --]
next prev parent reply other threads:[~2014-10-07 17:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 15:24 Carsten Kunze
2014-10-07 15:35 ` Bence Fábián
2014-10-07 15:41 ` David du Colombier
2014-10-07 15:58 ` Carsten Kunze
2014-10-07 17:27 ` Álvaro Jurado [this message]
2014-10-08 13:35 ` Charles Forsyth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHJeKDVpgbn1f0jAn9egEKQwnmMLRR-QZ_D27t9pbdSYF5zOcw@mail.gmail.com \
--to=elbingmiss@gmail.com \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).