bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bugs #10259] Spurious warnings about deprecated attribute being ignored


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 11:39:27 -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 15:34 (Europe/Vienna)

            What     | Removed                   | Added
---------------------------------------------------------------------------
          Resolution | None                      | Fixed
         Assigned to | None                      | ayers


------------------ Additional Follow-up Comments ----------------------------
Fixed in CVS.  I renamed it to GS_ATTRIB_DEPRECATED.  Thanks again for the 
report!






/**************************************************************************/
[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:  Fixed
Privacy:  Public
Assigned to:  ayers
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 15:34       By: David Ayers <ayers>
Fixed in CVS.  I renamed it to GS_ATTRIB_DEPRECATED.  Thanks again for the 
report!

-------------------------------------------------------
Date: Sat 09/04/2004 at 09:34       By: Peter Cooper <comrade>
I am comfortable with using David Ayres's solution. So far it looks like 
GSObjCRuntime.h is the only place the attribute is used.

Widespread adoption might be a good thing, as deprecated interfaces do exist 
for frameworks etc. Should the macro be defined here or somewhere else?

-------------------------------------------------------
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&amp;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&amp;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/







reply via email to

[Prev in Thread] Current Thread [Next in Thread]