Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760966AbXHBUKm (ORCPT ); Thu, 2 Aug 2007 16:10:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759364AbXHBUKd (ORCPT ); Thu, 2 Aug 2007 16:10:33 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:39781 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758049AbXHBUKc (ORCPT ); Thu, 2 Aug 2007 16:10:32 -0400 Date: Thu, 2 Aug 2007 21:10:30 +0100 From: Al Viro To: Jesper Juhl Cc: Jan Engelhardt , Guennadi Liakhovetski , linux-kernel@vger.kernel.org Subject: Re: gcc fixed size char array initialization bug - known? Message-ID: <20070802201030.GP21089@ftp.linux.org.uk> References: <9a8748490708021303h683a8be7if194a9314483c218@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9a8748490708021303h683a8be7if194a9314483c218@mail.gmail.com> User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 655 Lines: 13 On Thu, Aug 02, 2007 at 10:03:03PM +0200, Jesper Juhl wrote: > I believe Guennadi's point is that gcc does not warn about it in the > case of c[4] = "0123"; but only in the case of c[4] = "01234" - so if > we do have such initializations in the kernel we may have some bugs > hiding there that gcc doesn't warn us about. Who said it's a bug? Or that all arrays of char have to contain '\0' anywhere in them? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/