From: Richard Kreckel Date: Wed, 14 Sep 2016 20:00:29 +0000 (+0200) Subject: Fix compilation of programs using __attribute__((deprecated)). X-Git-Tag: release_1-7-1~2 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=c018acc8ddca143ba6a202ad095b192205708bc4 Fix compilation of programs using __attribute__((deprecated)). Ouu, we mustn't redefine 'deprecated' in order for this to work... Thanks to Alexander Proskurin for reporting this. --- diff --git a/ginac/compiler.h b/ginac/compiler.h index 823e197b..04df6c9b 100644 --- a/ginac/compiler.h +++ b/ginac/compiler.h @@ -26,11 +26,11 @@ #ifdef __GNUC__ #define unlikely(cond) __builtin_expect((cond), 0) #define likely(cond) __builtin_expect((cond), 1) -#define deprecated __attribute__ ((deprecated)); +#define attribute_deprecated __attribute__ ((deprecated)) #else #define unlikely(cond) (cond) #define likely(cond) (cond) -#define deprecated +#define attribute_deprecated #endif #ifdef _MSC_VER diff --git a/ginac/container.h b/ginac/container.h index f1c56afc..a0a6dbf2 100644 --- a/ginac/container.h +++ b/ginac/container.h @@ -168,35 +168,35 @@ public: setflag(get_default_flags()); } - explicit container(const ex & p1) deprecated; - container(const ex & p1, const ex & p2) deprecated; - container(const ex & p1, const ex & p2, const ex & p3) deprecated; - container(const ex & p1, const ex & p2, const ex & p3, const ex & p4) deprecated; - container(const ex & p1, const ex & p2, const ex & p3, const ex & p4, const ex & p5) deprecated; - container(const ex & p1, const ex & p2, const ex & p3, const ex & p4, const ex & p5, const ex & p6) deprecated; - container(const ex & p1, const ex & p2, const ex & p3, const ex & p4, const ex & p5, const ex & p6, const ex & p7) deprecated; - container(const ex & p1, const ex & p2, const ex & p3, const ex & p4, const ex & p5, const ex & p6, const ex & p7, const ex & p8) deprecated; + explicit container(const ex & p1) attribute_deprecated; + container(const ex & p1, const ex & p2) attribute_deprecated; + container(const ex & p1, const ex & p2, const ex & p3) attribute_deprecated; + container(const ex & p1, const ex & p2, const ex & p3, const ex & p4) attribute_deprecated; + container(const ex & p1, const ex & p2, const ex & p3, const ex & p4, const ex & p5) attribute_deprecated; + container(const ex & p1, const ex & p2, const ex & p3, const ex & p4, const ex & p5, const ex & p6) attribute_deprecated; + container(const ex & p1, const ex & p2, const ex & p3, const ex & p4, const ex & p5, const ex & p6, const ex & p7) attribute_deprecated; + container(const ex & p1, const ex & p2, const ex & p3, const ex & p4, const ex & p5, const ex & p6, const ex & p7, const ex & p8) attribute_deprecated; container(const ex & p1, const ex & p2, const ex & p3, const ex & p4, const ex & p5, const ex & p6, const ex & p7, const ex & p8, - const ex & p9) deprecated; + const ex & p9) attribute_deprecated; container(const ex & p1, const ex & p2, const ex & p3, const ex & p4, const ex & p5, const ex & p6, const ex & p7, const ex & p8, - const ex & p9, const ex & p10) deprecated; + const ex & p9, const ex & p10) attribute_deprecated; container(const ex & p1, const ex & p2, const ex & p3, const ex & p4, const ex & p5, const ex & p6, const ex & p7, const ex & p8, - const ex & p9, const ex & p10, const ex & p11) deprecated; + const ex & p9, const ex & p10, const ex & p11) attribute_deprecated; container(const ex & p1, const ex & p2, const ex & p3, const ex & p4, const ex & p5, const ex & p6, const ex & p7, const ex & p8, - const ex & p9, const ex & p10, const ex & p11, const ex & p12) deprecated; + const ex & p9, const ex & p10, const ex & p11, const ex & p12) attribute_deprecated; container(const ex & p1, const ex & p2, const ex & p3, const ex & p4, const ex & p5, const ex & p6, const ex & p7, const ex & p8, - const ex & p9, const ex & p10, const ex & p11, const ex & p12, const ex & p13) deprecated; + const ex & p9, const ex & p10, const ex & p11, const ex & p12, const ex & p13) attribute_deprecated; container(const ex & p1, const ex & p2, const ex & p3, const ex & p4, const ex & p5, const ex & p6, const ex & p7, const ex & p8, - const ex & p9, const ex & p10, const ex & p11, const ex & p12, const ex & p13, const ex & p14) deprecated; + const ex & p9, const ex & p10, const ex & p11, const ex & p12, const ex & p13, const ex & p14) attribute_deprecated; container(const ex & p1, const ex & p2, const ex & p3, const ex & p4, const ex & p5, const ex & p6, const ex & p7, const ex & p8, - const ex & p9, const ex & p10, const ex & p11, const ex & p12, const ex & p13, const ex & p14, const ex & p15) deprecated; + const ex & p9, const ex & p10, const ex & p11, const ex & p12, const ex & p13, const ex & p14, const ex & p15) attribute_deprecated; container(const ex & p1, const ex & p2, const ex & p3, const ex & p4, const ex & p5, const ex & p6, const ex & p7, const ex & p8, - const ex & p9, const ex & p10, const ex & p11, const ex & p12, const ex & p13, const ex & p14, const ex & p15, const ex & p16) deprecated; + const ex & p9, const ex & p10, const ex & p11, const ex & p12, const ex & p13, const ex & p14, const ex & p15, const ex & p16) attribute_deprecated; // First step of initialization of container with a comma-separated // sequence of expressions. Subsequent steps are handled by // container_init<>::operator,(). - container_init operator=(const ex & x) deprecated; + container_init operator=(const ex & x) attribute_deprecated; // functions overriding virtual functions from base classes public: diff --git a/ginac/matrix.h b/ginac/matrix.h index e611aa5b..e2cb6142 100644 --- a/ginac/matrix.h +++ b/ginac/matrix.h @@ -102,7 +102,7 @@ public: matrix(unsigned r, unsigned c, const lst & l); matrix(std::initializer_list> l); - matrix_init operator=(const ex & x) deprecated; + matrix_init operator=(const ex & x) attribute_deprecated; protected: matrix(unsigned r, unsigned c, const exvector & m2); matrix(unsigned r, unsigned c, exvector && m2);