From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30034 invoked by alias); 22 Dec 2004 20:54:38 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 29870 invoked by uid 48); 22 Dec 2004 20:54:33 -0000 Date: Wed, 22 Dec 2004 20:54:00 -0000 Message-ID: <20041222205433.29867.qmail@sourceware.org> From: "nomis80 at nomis80 dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040913213750.17470.austern@apple.com> References: <20040913213750.17470.austern@apple.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/17470] Visibility attribute ignored for explicit template instantiation X-Bugzilla-Reason: CC X-SW-Source: 2004-12/txt/msg03262.txt.bz2 List-Id: ------- Additional Comments From nomis80 at nomis80 dot org 2004-12-22 20:54 ------- I just got hit with that bug and spent too much time figuring out what was wrong. Here's my code, just to show an example of real-life usage: ////////////////////////////////////////////////////////////////////////// /** * Returns the unsigned version of \a number. */ template< class T > T abs( T number ) { // This is the default implementation, using comparison to zero and unary // negation operator. if ( number < 0 ) { return -number; } return number; } // Here are some specific implementations. template<> bool WRAP_API abs( bool number ); template<> char WRAP_API abs( char number ); template<> unsigned char WRAP_API abs( unsigned char number ); template<> short WRAP_API abs( short number ); template<> unsigned short WRAP_API abs( unsigned short number ); template<> int WRAP_API abs( int number ); template<> unsigned int WRAP_API abs( unsigned int number ); template<> long WRAP_API abs( long number ); template<> unsigned long WRAP_API abs( unsigned long number ); template<> float WRAP_API abs( float number ); template<> double WRAP_API abs( double number ); ////////////////////////////////////////////////////////////////////////// Please fix this bug! -- What |Removed |Added ---------------------------------------------------------------------------- CC| |s_gccbugzilla at nedprod dot | |com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17470