[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200910200102.30478.rusty@rustcorp.com.au>
Date: Tue, 20 Oct 2009 01:02:29 +1030
From: Rusty Russell <rusty@...tcorp.com.au>
To: "Jan Beulich" <JBeulich@...ell.com>
Cc: "Haavard Skinnemoen" <haavard.skinnemoen@...el.com>,
"Haavard Skinnemoen" <hskinnemoen@...el.com>,
"Andrew Morton" <akpm@...ux-foundation.org>,
"Alan Cox" <alan@...ux.intel.com>,
linux-arm-kernel@...ts.infradead.org,
u.kleine-koenig@...gutronix.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] serial/atmel_serial: Fix another fallout of the change to BUILD_BUG_ON
On Mon, 19 Oct 2009 06:49:40 pm Jan Beulich wrote:
> >>> Rusty Russell <rusty@...tcorp.com.au> 19.10.09 08:08 >>>
> >How's this? It's not quite valid C, but it "works":
>
> But that's not what you proposed initially, i.e. generating a link time
> error if a compile time error can't be generated (and only if even a link
> time error isn't possible, a run time one should be forced).
Yeah, this was cleverer. A compile time is nicer than link time. And this
is *actually* what I want: a compile fail if the compiler knows enough, runtime
otherwise.
> And btw., why do you think this isn't valid C?
>From my glance at ISO C, non-positive sized variable length arrays are
invalid. gcc here seems to give the expected results (eg. sizeof gives
a negative result).
Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists