[Click] CLICK_DEPRECATED

Jens Mueller jmueller at informatik.hu-berlin.de
Wed Sep 6 05:54:44 EDT 2006


Hi,

the macro definition of CLICK_DEPRECATED in config.h.in is wrong
according to my experiences. The syntax used in
include/click/bighashmap.hh on line 113 is supported since gcc version
3.4. But the macro assumes gcc version 3.1.  Consider the following
example:

class Foo {
    void foo() __attribute__((deprecated));

    void bar() __attribute__((deprecated)) { return; }

};

void Foo::foo() { }


The definition of method 'foo' is valid since gcc 3.1, whereas the
definition and implementation of method 'bar' is only allowed since gcc
3.4.
I therefore patched the macro definition. What do you think?

Kind regards,
Jens
-------------- next part --------------
Index: config.h.in
===================================================================
RCS file: /cvs/click/release/one/config.h.in,v
retrieving revision 1.38
diff -r1.38 config.h.in
117c117
< #if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ == 0)
---
> #if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)


More information about the click mailing list