From c018acc8ddca143ba6a202ad095b192205708bc4 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Wed, 14 Sep 2016 22:00:29 +0200 Subject: [PATCH] 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. --- ginac/compiler.h | 4 ++-- ginac/container.h | 34 +++++++++++++++++----------------- ginac/matrix.h | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) 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); -- 2.44.0