> __deprecated void deprecated_function_proto();

How does the compiler act when it comes across this?
Is it compatible (if yes, to what extent) with non-GCC compilers?
Weeding GCC extensions out of Parted is not an easy thing to do, but we
need not make it worse...

It seems to be ANSI compatible.

#include <stdio.h>

#define __deprecated __attribute__((deprecated))

__deprecated void foo(void);

int main(void) {
       foo();
       return 0;
}

void foo(void) {
       printf("I am foo.\n");
}

The above code being compiled with -ansi -pedantic gives this:

[EMAIL PROTECTED] devel]$ gcc -ansi -pedantic try.c
try.c: In function 'main':
try.c:8: warning: 'foo' is deprecated (declared at try.c:5)
[EMAIL PROTECTED] devel]$

Happy hacking,
Debarshi
--
Universities are places of knowledge.  The freshman each bring a
little in with them, and the seniors take none away, so knowledge
accumulates.

_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Reply via email to