From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265247AbUGLRrO (ORCPT ); Mon, 12 Jul 2004 13:47:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265249AbUGLRrO (ORCPT ); Mon, 12 Jul 2004 13:47:14 -0400 Received: from quechua.inka.de ([193.197.184.2]:30344 "EHLO mail.inka.de") by vger.kernel.org with ESMTP id S265247AbUGLRrJ (ORCPT ); Mon, 12 Jul 2004 13:47:09 -0400 To: linux-kernel@vger.kernel.org Subject: Re: [PATCH] Use NULL instead of integer 0 in security/selinux/ References: <52r7rj7txj.fsf@topspin.com> Organization: private Linux site, southern Germany Date: Sun, 11 Jul 2004 23:19:54 +0200 From: Olaf Titz Message-Id: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org > struct foo { > int a; > int b; > }; > > then sparse is perfectly happy with someone clearing out a struct foo > like this: > > struct foo bar = { 0 }; > > but then if someone changes struct foo to be > > struct foo { > void *x; > int a; > int b; > }; > > sparse will complain about that initialization, and all of the fixes It complains rather rightly. Think what happens if the original initializer was struct foo bar = { 1 }; This ambiguity may well be the main reason for the C99 initializer syntax. Olaf