From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27526 invoked by alias); 16 Mar 2011 14:15:46 -0000 Received: (qmail 27517 invoked by uid 22791); 16 Mar 2011 14:15:45 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Mar 2011 14:15:39 +0000 Received: (qmail 20681 invoked from network); 16 Mar 2011 14:15:37 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 16 Mar 2011 14:15:37 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [RFA] New rules for ARI Date: Wed, 16 Mar 2011 14:41:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-27-generic; KDE/4.6.1; x86_64; ; ) Cc: Joel Brobecker , Tom Tromey , Pierre Muller , "'Maxim Grigoriev'" References: <4D798969.8070309@tensilica.com> <20110316140240.GQ31264@adacore.com> In-Reply-To: <20110316140240.GQ31264@adacore.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201103161415.32326.pedro@codesourcery.com> X-IsSubscribed: yes 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/msg00845.txt.bz2 On Wednesday 16 March 2011 14:02:40, Joel Brobecker wrote: > > 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 :-(. Maybe by including the in-tree readline headers with -isystem rather than -I. I sense that other cases in other libraries will appear though, and that it'd bring in more pain than benefit. -- Pedro Alves