From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6397 invoked by alias); 7 Dec 2006 02:40:46 -0000 Received: (qmail 6373 invoked by uid 22791); 7 Dec 2006 02:40:45 -0000 X-Spam-Check-By: sourceware.org Received: from sineb-mail-3.sun.com (HELO sineb-mail-3.sun.com) (192.18.19.10) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 07 Dec 2006 02:40:37 +0000 Received: from fe-apac-05.sun.com (fe-apac-05.sun.com [192.18.19.176] (may be forged)) by sineb-mail-3.sun.com (8.13.6+Sun/8.12.9) with ESMTP id kB72eRFi016350 for ; Thu, 7 Dec 2006 10:40:33 +0800 (SGT) Received: from conversion-daemon.mail-apac.sun.com by mail-apac.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0J9V00C01U3BEI00@mail-apac.sun.com> (original mail from Irene.Huang@Sun.COM) for gcc-help@gcc.gnu.org; Thu, 07 Dec 2006 10:40:27 +0800 (SGT) Received: from [129.158.217.138] by mail-apac.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPSA id <0J9V001EDU3EI9UI@mail-apac.sun.com>; Thu, 07 Dec 2006 10:40:26 +0800 (SGT) Date: Thu, 07 Dec 2006 02:40:00 -0000 From: "Irene (Shi Ying) Huang" Subject: Re: help on fucntion visibility In-reply-to: <4576848E.8040807@gmail.com> To: =?UTF-8?Q?Art=C5=ABras?= Moskvinas Cc: gcc-help@gcc.gnu.org Message-id: <1165459232.22199.3.camel@goalie> MIME-version: 1.0 X-Mailer: Evolution 2.8.1.1 Content-type: text/plain Content-transfer-encoding: 8BIT References: <1165386948.1002.70.camel@goalie> <4576848E.8040807@gmail.com> Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2006-12/txt/msg00127.txt.bz2 Thanks Artūras Is the macro you mention about HAVE_GCCVISIBILITYPATCH? If it is an official macro, where can I find the documentation for it? Thanks again :) --Irene On Wed, 2006-12-06 at 10:51 +0200, Artūras Moskvinas wrote: > > > > > I know that the current version gcc supports function visibility > > attributes, yet some of the previous versions does not. > > > > Could any one kindly tell since which version is visibility attribute > > supported by gcc? So that I will be able to write some conditional > > macros definition code to make things more flexible? > > > > The macro definition is supposed to be something like: > > #if ((__GNUC__ *100 +__GNUC_MINOR__) >= 303) > > #define G_GNUC_INTERNAL __attribute__((visibility("hidden"))) > > #else > > #define G_GNUC_INTERNAL > > #endif > > > Look at this wiki entry for checking visibility(a macros is already > there...): > http://gcc.gnu.org/wiki/Visibility > > And by reading manual, you will find, that visibility attribute appeared > in 3.3 release (earlier compiler do not have this option documented in > manual) > > > Arturas M.