From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30399 invoked by alias); 19 Apr 2011 11:19:13 -0000 Received: (qmail 30391 invoked by uid 22791); 19 Apr 2011 11:19:12 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-wy0-f175.google.com (HELO mail-wy0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 19 Apr 2011 11:18:59 +0000 Received: by wye20 with SMTP id 20so5679697wye.20 for ; Tue, 19 Apr 2011 04:18:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.202.149 with SMTP id fe21mr6219910wbb.205.1303211938057; Tue, 19 Apr 2011 04:18:58 -0700 (PDT) Received: by 10.227.0.140 with HTTP; Tue, 19 Apr 2011 04:18:58 -0700 (PDT) In-Reply-To: <201104191306.29559.ebotcazou@adacore.com> References: <201104191306.29559.ebotcazou@adacore.com> Date: Tue, 19 Apr 2011 12:08:00 -0000 Message-ID: Subject: Re: [patch] Add missing test for DECL_NO_INLINE_WARNING_P From: Richard Guenther To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg01516.txt.bz2 On Tue, Apr 19, 2011 at 1:06 PM, Eric Botcazou wrot= e: > Hi, > > tree_inlinable_function_p issues the -Winline warning only if > > =A0/* We only warn for functions declared `inline' by the user. =A0*/ > =A0do_warning =3D (warn_inline > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&& DECL_DECLARED_INLINE_P (fn) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&& !DECL_NO_INLINE_WARNING_P (fn) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&& !DECL_IN_SYSTEM_HEADER (fn)); > > is true, so in particular only if DECL_NO_INLINE_WARNING_P is not set. = =A0Now > expand_call_inline also issues the -Winline warning > > =A0 =A0 =A0else if (warn_inline && DECL_DECLARED_INLINE_P (fn) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 && !DECL_IN_SYSTEM_HEADER (fn) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 && reason !=3D CIF_UNSPECIFIED > =A0 =A0 =A0 =A0 =A0 =A0 =A0 && !lookup_attribute ("noinline", DECL_ATTRIB= UTES (fn)) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Do not warn about not inlined recursive ca= lls. =A0*/ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 && !cgraph_edge_recursive_p (cg_edge) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Avoid warnings during early inline pass. */ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 && cgraph_global_info_ready) > > but disregards the DECL_NO_INLINE_WARNING_P flag. > > Tested on i586-suse-linux, OK for the mainline? Ok. Thanks, Richard. > > 2011-04-19 =A0Eric Botcazou =A0 > > =A0 =A0 =A0 =A0* tree-inline.c (expand_call_inline): Do not issue a -Winl= ine warning > =A0 =A0 =A0 =A0if DECL_NO_INLINE_WARNING_P is set on the function. > > > -- > Eric Botcazou >