Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57753 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76965 invoked from network); 5 Feb 2012 23:04:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2012 23:04:35 -0000 Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.22 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.22 smtp2.ist.utl.pt Linux 2.6 Received: from [193.136.128.22] ([193.136.128.22:46495] helo=smtp2.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1C/F1-60839-FFA0F2F4 for ; Sun, 05 Feb 2012 18:04:32 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp2.ist.utl.pt (Postfix) with ESMTP id 75C0070003C3 for ; Sun, 5 Feb 2012 23:04:28 +0000 (WET) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp2.ist.utl.pt ([127.0.0.1]) by localhost (smtp2.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id emUDhlv4kbev for ; Sun, 5 Feb 2012 23:04:28 +0000 (WET) Received: from nebm.ist.utl.pt (unknown [IPv6:2001:690:2100:4::58:1]) by smtp2.ist.utl.pt (Postfix) with ESMTP id 41F107000450 for ; Sun, 5 Feb 2012 23:04:28 +0000 (WET) Received: from localhost ([127.0.0.1] helo=nebm.ist.utl.pt) by nebm.ist.utl.pt with esmtp (Exim 4.72) (envelope-from ) id 1RuB8F-0004Ng-Um for internals@lists.php.net; Sun, 05 Feb 2012 23:04:28 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 06 Feb 2012 00:04:27 +0100 To: Organization: =?UTF-8?Q?N=C3=BAcleo_de_Engenharia_Biom=C3=A9dica_do_Insti?= =?UTF-8?Q?tuto_Superior_T=C3=A9cnico?= In-Reply-To: <4F2EFDD1.4090103@sugarcrm.com> References: <4F2EDE20.50207@php.net> <4F2EFB75.6010204@sugarcrm.com> <4F2EFDD1.4090103@sugarcrm.com> Message-ID: X-Sender: glopes@nebm.ist.utl.pt User-Agent: RoundCube Webmail/0.5.3 Subject: Re: [PHP-DEV] Static Analysis of =?UTF-8?Q?PHP=5F=35=5F=34=20with?= =?UTF-8?Q?=20CLANG?= From: glopes@nebm.ist.utl.pt (Gustavo Lopes) On Sun, 05 Feb 2012 14:08:17 -0800, Stas Malyshev wrote: > Another thing - is there any way to give CLANG some hints about some > functions - such as the fact that zend_error(E_ERROR) does not return > or just make some exceptions when we know some situation that it > thinks can happen does not in fact happen - such as revtal_ptr_ptr = > &retval_ptr and then passing retval_ptr_ptr would actually change > retval_ptr somewhere on the way, etc. > The idea is if we could weed out false positives and somehow mark > them we could use this tool in CI for detecting real errors. Perhaps those instances could be replaced by zend_error_noreturn. That variant has the "noreturn" attribute, which signals the function never returns. This useful for suppressing those kind of warnings (note C11 also added a standard __Noreturn). -- Gustavo Lopes