|
From: | David Ayers |
Subject: | [bugs #10259] Spurious warnings about deprecated attribute being ignored from GSObjCRuntime.h on pre-GCC 3.1 compilers |
Date: | Sat, 04 Sep 2004 01:25:48 -0400 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803 |
This mail is an automated notification from the bugs tracker of the project: GNUstep. /**************************************************************************/ [bugs #10259] Latest Modifications: Changes by: David Ayers <d.ayers@inode.at> 'Date: Sat 09/04/2004 at 05:20 (Europe/Vienna) ------------------ Additional Follow-up Comments ---------------------------- Thanks for reporting! This is rather unfortunate. Actually the NO_DEPRECATED macro is a convenience macro for user code to hide the deprecated declarations all together. It predates the use of the deprecated attribute. I do not necessarily oppose the patch. But it would hide the prototypes and possibly break user code with older compilers. Maybe it would be better to introduce something like: #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) #define GCC_ATTRIB_DEPRECATED __attribute__ ((deprecated)) #else #define GCC_ATTRIB_DEPRECATED #endif and use that macro instead like this patch? /**************************************************************************/ [bugs #10259] Full Item Snapshot: URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=10259> Project: GNUstep Submitted by: Peter Cooper On: Fri 09/03/2004 at 22:52 Category: Base/Foundation Severity: 5 - Average Item Group: Change Request Resolution: None Privacy: Public Assigned to: None Status: Open Summary: Spurious warnings about deprecated attribute being ignored from GSObjCRuntime.h on pre-GCC 3.1 compilers Original Submission: Many lines of warnings about the deprecated attribute being ignored are generated on gcc 2.95 and presumably 3.0. The deprecated attribute was only introduced in gcc 3.1 (according to http://www.ohse.de/uwe/articles/gcc-attributes.html). This patch replaces the undefined NO_DEPRECATED macro with a test for GCC version in GSObjCRuntime.h. Follow-up Comments ------------------ ------------------------------------------------------- Date: Sat 09/04/2004 at 05:20 By: David Ayers <ayers> Thanks for reporting! This is rather unfortunate. Actually the NO_DEPRECATED macro is a convenience macro for user code to hide the deprecated declarations all together. It predates the use of the deprecated attribute. I do not necessarily oppose the patch. But it would hide the prototypes and possibly break user code with older compilers. Maybe it would be better to introduce something like: #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) #define GCC_ATTRIB_DEPRECATED __attribute__ ((deprecated)) #else #define GCC_ATTRIB_DEPRECATED #endif and use that macro instead like this patch? File Attachments ------------------- ------------------------------------------------------- Date: Sat 09/04/2004 at 05:20 Name: base.patch Size: 3.46KB By: ayers Alternate patch to avoid hiding prototypes http://savannah.gnu.org/bugs/download.php?item_id=10259&item_file_id=1637 ------------------------------------------------------- Date: Fri 09/03/2004 at 22:52 Name: GSObjCRuntime.h.patch Size: 647B By: comrade Patch for GSObjCRuntime.h to remove spurious warnings on old versions of gcc http://savannah.gnu.org/bugs/download.php?item_id=10259&item_file_id=1636 For detailed info, follow this link: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=10259> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |