Date: Fri, 1 May 2009 09:41:34 +0100 From: Bruce Cran <bruce@cran.org.uk> To: Julian Elischer <julian@elischer.org> Cc: freebsd-hackers@FreeBSD.org, Christoph Mallon <christoph.mallon@gmx.de> Subject: Re: C99: Suggestions for style(9) Message-ID: <20090501094134.77b6de04@gluon.draftnet> In-Reply-To: <49FAB322.9030103@elischer.org> References: <49F4070C.2000108@gmx.de> <20090428114754.GB89235@server.vk2pj.dyndns.org> <20090430.090226.1569754707.imp@bsdimp.com> <49FA8D73.6040207@gmx.de> <49FAB322.9030103@elischer.org>
index | next in thread | previous in thread | raw e-mail
On Fri, 01 May 2009 01:30:26 -0700 Julian Elischer <julian@elischer.org> wrote: > Christoph Mallon wrote: > >> > >> since really you'd want to write: > >> > >> struct foo *fp = get_foo(); > >> if (!fp) return; > >> struct bar *bp = fp->bp; > >> > >> which isn't legal in 'C'. However, we have enough where this isn't > > > > You're mistaken, this is perfectly legal C. See ISO/IEC 9899:1999 > > (E) §6.8.2:1. In short: you can mix statements and declarations. > > now, but not all C compilers are C99 and a lot of FreeBSD code > is taken and run in other situations. There is FreeBSD code > in all sorts of environments, not all of which have new compilers. > Doesn't FreeBSD already use C99 features such as stdint and named initializers? I don't think sys/cam/scsi/scsi_ses.c would compile with a C89 compiler for example. -- Bruce Cranhelp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090501094134.77b6de04>
