Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Using deprecated functions attributes [FEATURE REQUEST]
Using deprecated functions attributes [FEATURE REQUEST] [message #13055] Fri, 07 December 2007 11:24 Go to next message
waxblood is currently offline  waxblood
Messages: 95
Registered: January 2007
Member
I've took the message from

Novo wrote on Thu, 06 December 2007 20:29

luzr wrote on Tue, 27 November 2007 16:55


First of all, SetCtrl(..., Ctrl *ctrl);

is deprecated and should not be used in any new code, in fact, it will likely be removed.



// Linux/xcode
#define DEPRECATED_FUNC __attribute__((__deprecated__))
// MSVC
#define DEPRECATED_FUNC __declspec(deprecated)

You might consider using of DEPRECATED_FUNC macro above to inform users about deprecated methods/functions.

It is more informative than just comments in the source code.



I favour this approach. My problem so far is I've tried it under Linux, and I discovered the option -Wall must be enabled in order for this to work : this cause the display of a lot of undesired warning messages. I've searched the GCC documentation, but I couldn't find a way to specifically enable only deprecated function attribs warnings, apart from issuing a -Wall followed by a long list of -Wnothis -Wnothat -Wnoetc . Does anybody knows it it's there a more elegant way to treat the problem?


David

Re: Using deprecated functions attributes [FEATURE REQUEST] [message #13122 is a reply to message #13055] Thu, 13 December 2007 22:14 Go to previous message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
We build our code with -Wall -Wno-format-y2k all the time.
IMHO, it worth fixing all these warning. They all are potential problems. I'm getting my report with compilation warnings every week Smile.


Regards,
Novo
Previous Topic: Linux - Bug in last uvs build
Next Topic: Zoom a specific area
Goto Forum:
  


Current Time: Sat Apr 20 10:32:33 CEST 2024

Total time taken to generate the page: 0.04351 seconds