]> www.ginac.de Git - ginac.git/commitdiff
Fix compilation of programs using __attribute__((deprecated)).
authorRichard Kreckel <kreckel@ginac.de>
Wed, 14 Sep 2016 20:00:29 +0000 (22:00 +0200)
committerRichard Kreckel <kreckel@ginac.de>
Wed, 14 Sep 2016 20:00:29 +0000 (22:00 +0200)
Ouu, we mustn't redefine 'deprecated' in order for this to work...

Thanks to Alexander Proskurin for reporting this.

ginac/compiler.h
ginac/container.h
ginac/matrix.h

index 823e197b9449fdbea80f9915515bf4da47cfb3bd..04df6c9b69a8411e803c5e5ff3f4f9c8a3e72b38 100644 (file)
 #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
index f1c56afcfe92709414c27cccefdc34cbedbc6526..a0a6dbf2f9c9ba03def8cfa532205fbc45314537 100644 (file)
@@ -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<ex, STLT> operator=(const ex & x) deprecated;
+       container_init<ex, STLT> operator=(const ex & x) attribute_deprecated;
 
        // functions overriding virtual functions from base classes
 public:
index e611aa5b022e30b3a93d48a27042fbb694303033..e2cb614278d60db5300bd3dc3f7348a9902898f8 100644 (file)
@@ -102,7 +102,7 @@ public:
        matrix(unsigned r, unsigned c, const lst & l);
        matrix(std::initializer_list<std::initializer_list<ex>> l);
 
-       matrix_init<ex, exvector::iterator> operator=(const ex & x) deprecated;
+       matrix_init<ex, exvector::iterator> operator=(const ex & x) attribute_deprecated;
 protected:
        matrix(unsigned r, unsigned c, const exvector & m2);
        matrix(unsigned r, unsigned c, exvector && m2);