svn commit: r189315 - in head/sys/netgraph: . atm
Alexander Kabaev
kabaev at gmail.com
Tue Mar 3 11:47:31 PST 2009
On Tue, 3 Mar 2009 18:47:33 +0000 (UTC)
Ed Schouten <ed at FreeBSD.org> wrote:
> Author: ed
> Date: Tue Mar 3 18:47:33 2009
> New Revision: 189315
> URL: http://svn.freebsd.org/changeset/base/189315
>
> Log:
> Make Netgraph compile with Clang.
>
> Clang disallows structs with variable length arrays to be nested
> inside other structs, because this is in violation with ISO C99. Even
> though we can keep bugging the LLVM folks about this issue, we'd
> better just fix our code to not do this. This code seems to be the
> only code in the entire source tree that does this.
>
> I haven't tested this patch by using the kernel modules in
> question, but Diane Bruce and I have compared disassembled versions
> of these kernel modules. We would have expected them to be exactly
> the same, but due to randomness in the register allocator and
> reordering of instructions, there were some minor differences.
>
> Approved by: julian
>
> Modified:
> head/sys/netgraph/atm/ng_ccatm.h
> head/sys/netgraph/ng_pppoe.c
> head/sys/netgraph/ng_pppoe.h
Hi,
I hope I am not the only one to see this as a code regression from the
code readability viewpoint. I think obfuscation of our sources just to
bow to yet another head-strong compiler should stop. If LLVM cannot
parse common code constructs, LLVM is NOT suitable for our kernel no
matter how many paragraphs of language-lawyer-speak they use to
justify it.
--
Alexander Kabaev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20090303/178d06ee/signature.pgp
More information about the svn-src-head
mailing list