Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Mar 2009 13:34:07 -0800
From:      Julian Elischer <julian@elischer.org>
To:        Ed Schouten <ed@80386.nl>
Cc:        net@FreeBSD.org
Subject:   Re: Making Netgraph compile with LLVM
Message-ID:  <49AAFF4F.6010400@elischer.org>
In-Reply-To: <20090301161827.GR19161@hoeg.nl>
References:  <20090301161827.GR19161@hoeg.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
Ed Schouten wrote:
> Hello all,
> 
> It turns out Netgraph uses a language construct that is only allowed
> with GCC, but not with LLVM. According to the specs, LLVM's behaviour is
> correct. It is not allowed to do this:
> 
> 	struct a {
> 		struct {
> 			int i;
> 			char j[];
> 		} b;
> 		char k[20];
> 	};
> 
> error: variable sized type 'b' must be at end of struct or class

not sure wher eyou are seeing this.

the examples you fix don't seem to be nested structs..  what is the 
outer struct?

> 
> Diane Bruce and I thought this patch should solve this issue:
> 
> 	http://80386.nl/pub/ng.diff
> 
> Yes, I know, the solution isn't really elegant, but I think this is the
> only way to do this safely. Diane and I also compared the output of
> objdump and they seem to be equivalent, except for some reordering.
> 
> Objections before I commit this to SVN?
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49AAFF4F.6010400>