guile-user
[Top][All Lists]
Advanced

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

Re: SCM_LENGTH ???


From: Ken Raeburn
Subject: Re: SCM_LENGTH ???
Date: Mon, 10 Jan 2005 15:34:56 -0500

On Jan 10, 2005, at 12:26, Marius Vollmer wrote:
The recommended way to check for deprecated features is to compile a
version of Guile with --disable-deprecated and compile/link/test
against that.

It might be a bit annoying to do in the source, but what about flagging deprecated symbols while still allowing their use, in the non-"--disable-deprecated" case?

E.g., declare a function SCM_LENGTH, which is declared in the header file with a macro which under recent enough versions of GCC expands to __attribute__((deprecated)) and on Windows to __declspec(deprecated), and in the source file defining the routine, on systems with the right compiler and assembler support, create a .gnu.warning.SCM_LENGTH (or .gnu.warning._SCM_LENGTH) section containing a message telling the user that the function will go away in a future release. (As I understand it, on Windows you can even deprecate a macro by name.)

It won't work on all systems, but it should work on a lot of the configurations we'd care most about. And if a macro is deprecated, the overhead of a function call shouldn't be a big deal, as long as the semantics are such that it can actually be implemented with a function call.

I started working out some configure tests and such to implement this at work, I could try to flesh them out a bit more if you like. (I *think* I've got all my papers in order, but I don't know for sure if I've got papers in from my current employer, MIT, to cover Guile. I haven't done the GNU maintainer bit in a while, could someone remind me where the list is? Or check it for me?)

Ken





reply via email to

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