From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 10 03:04:14 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E555B16A4CE for ; Tue, 10 Feb 2004 03:04:14 -0800 (PST) Received: from service.sh.cvut.cz (service.sh.cvut.cz [147.32.127.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id B546043D1D for ; Tue, 10 Feb 2004 03:04:14 -0800 (PST) (envelope-from V.Haisman@sh.cvut.cz) Received: from localhost (localhost [127.0.0.1]) by service.sh.cvut.cz (Postfix) with ESMTP id 7C1AA1B93BA for ; Tue, 10 Feb 2004 12:04:12 +0100 (CET) Received: from service.sh.cvut.cz ([127.0.0.1]) by localhost (service [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 16571-04 for ; Tue, 10 Feb 2004 12:04:11 +0100 (CET) Received: from logout.sh.cvut.cz (logout.sh.cvut.cz [147.32.127.203]) by service.sh.cvut.cz (Postfix) with ESMTP id 9310A1B94CF for ; Tue, 10 Feb 2004 11:36:12 +0100 (CET) Received: from amber2 (amber2.sh.cvut.cz [147.32.123.10]) by logout.sh.cvut.cz (Postfix) with SMTP id 9FC013C31F for ; Tue, 10 Feb 2004 11:36:15 +0100 (CET) Message-ID: <006a01c3efc1$b3b27710$0a7b2093@amber2> From: =?windows-1250?Q?V=E1clav_Haisman?= To: References: Date: Tue, 10 Feb 2004 11:36:11 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1250" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at sh.cvut.cz Subject: Re: how to fool gcc? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2004 11:04:15 -0000 Fill a GCC PR? I am not expert in these but is it OK that it evaluates the parameter three times? Vaclav Haisman ----- Original Message ----- From: "Dag-Erling Smørgrav" To: Sent: Tuesday, February 10, 2004 10:09 AM Subject: how to fool gcc? I'm having trouble with some uncommitted OpenPAM patches that I'd like to get into the tree. The problem actually doesn't occur with a normal build, but it prevents me from building a debugging version of libpam. Part of the patch declares openpam_log(3) as printf-like so gcc can check format strings etc. However, openpam_log(3) is also used in debugging macros such as this: #define RETURNS(s) do { \ if ((s) == NULL) \ openpam_log(PAM_LOG_DEBUG, "returning NULL"); \ else \ openpam_log(PAM_LOG_DEBUG, "returning '%s'", (s)); \ return (s); \ } while (0) [...]