Skip to content

Commit 625defd

Browse files
committed
fix gcc version check for deprecations
1 parent 8c1b296 commit 625defd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

bn_prime_tab.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const mp_digit ltm_prime_tab[] = {
4444
#endif
4545
};
4646

47-
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 301)
47+
#if defined(__GNUC__) && __GNUC__ >= 4
4848
#pragma GCC diagnostic push
4949
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
5050
const mp_digit *s_mp_prime_tab = ltm_prime_tab;

tommath.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ TOOM_SQR_CUTOFF;
206206
# endif
207207
#endif
208208

209-
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 301)
209+
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 405)
210210
# define MP_DEPRECATED(x) __attribute__((deprecated("replaced by " #x)))
211211
# define PRIVATE_MP_DEPRECATED_PRAGMA(s) _Pragma(#s)
212212
# define MP_DEPRECATED_PRAGMA(s) PRIVATE_MP_DEPRECATED_PRAGMA(GCC warning s)

tommath_private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
* On Win32 a .def file must be used to specify the exported symbols.
1919
*/
20-
#if defined (MP_PRIVATE_SYMBOLS) && __GNUC__ >= 4
20+
#if defined (MP_PRIVATE_SYMBOLS) && defined(__GNUC__) && __GNUC__ >= 4
2121
# define MP_PRIVATE __attribute__ ((visibility ("hidden")))
2222
#else
2323
# define MP_PRIVATE

0 commit comments

Comments
 (0)