bugGNUstep - Bugs: bug #10259, Spurious warnings about deprecated...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #10259: Spurious warnings about deprecated attribute being ignored from GSObjCRuntime.h on pre-GCC 3.1 compilers

Submitted by:  Peter Cooper <comrade>
Submitted on:  Fri 03 Sep 2004 10:52:04 PM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: Change RequestStatus: Fixed
Privacy: PublicAssigned to: David Ayers <ayers>
Open/Closed: Closed

Sat 04 Sep 2004 03:34:16 PM UTC, comment #3:

Fixed in CVS. I renamed it to GS_ATTRIB_DEPRECATED. Thanks again for the report!

David Ayers <ayers>
Project MemberIn charge of this item.
Sat 04 Sep 2004 09:34:37 AM UTC, comment #2:

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?

Peter Cooper <comrade>
Sat 04 Sep 2004 05:20:35 AM UTC, comment #1:

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?

David Ayers <ayers>
Project MemberIn charge of this item.
Fri 03 Sep 2004 10:52:04 PM UTC, 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.

Peter Cooper <comrade>

 

Attached Files
file #1708:  base.patch added by ayers (3KiB - application/octet-stream - Alternate patch to avoid hiding prototypes)
file #1707:  GSObjCRuntime.h.patch added by comrade (647B - application/octet-stream - Patch for GSObjCRuntime.h to remove spurious warnings on old versions of gcc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 5 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 07 Sep 2004 11:47:55 AM UTCayersOpen/ClosedOpen=>Closed
Sat 04 Sep 2004 03:34:15 PM UTCayersStatusNone=>Fixed
  Assigned toNone=>ayers
Sat 04 Sep 2004 05:20:35 AM UTCayersAttached File-=>Added base.patch, #1637
Fri 03 Sep 2004 10:52:04 PM UTCcomradeAttached File-=>Added GSObjCRuntime.h.patch, #1636

Back to the top


Powered by Savane 3.1-cleanup1