From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23470 invoked by alias); 16 Mar 2011 14:02:51 -0000 Received: (qmail 23461 invoked by uid 22791); 16 Mar 2011 14:02:50 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Mar 2011 14:02:46 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id E4BE82BACE9; Wed, 16 Mar 2011 10:02:44 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id clQo6T4BW7C3; Wed, 16 Mar 2011 10:02:44 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 9A2E42BACE0; Wed, 16 Mar 2011 10:02:44 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id C1C461459B0; Wed, 16 Mar 2011 18:02:40 +0400 (RET) Date: Wed, 16 Mar 2011 14:23:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: Pierre Muller , 'Maxim Grigoriev' , gdb-patches@sourceware.org Subject: Re: [RFA] New rules for ARI Message-ID: <20110316140240.GQ31264@adacore.com> References: <4D798969.8070309@tensilica.com> <20110311064501.GA30306@adacore.com> <41860.1858466447$1299837420@news.gmane.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00844.txt.bz2 > Pierre> Reading Joel's comment, I thought > Pierre> that the missing 'void' inside braces > Pierre> should be a gdb_ari.sh output, > Pierre> so I tried to write a new rule > Pierre> to find out if functions that have no parameters > Pierre> do use () instead of (void). > > I wonder if -Wstrict-prototypes would catch this. Actually, it would. But when I tried to use it in our build, I quickly hit a problem, because the headers we include might not have strict prototypes. For instance, readline defines: typedef int Function (); typedef void VFunction (); typedef char *CPFunction (); typedef char **CPPFunction (); So, unless there is a way to say check strict-prototyping certain files only, it's going to be tough to use :-(. -- Joel