Skip to content

Commit 039a275

Browse files
committed
adding compile-time messages for non-MSVC compilers
1 parent 22243a9 commit 039a275

17 files changed

+64
-32
lines changed

include/universal/number/posit/specialized/posit_128_2.hpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
#if POSIT_FAST_POSIT_128_2
1919
#undef POSIT_FAST_POSIT_128_2
2020
#define POSIT_FAST_POSIT_128_2 0
21+
#ifdef _MSC_VER
2122
#pragma message("Fast specialization of posit<128,2> requested but ignored as fast implemention is TBD")
23+
#else
24+
#pragma GCC warning "Fast specialization of posit<128,2> requested but ignored as fast implemention is TBD"
25+
#endif
2226
#endif
2327

2428
namespace sw { namespace universal {
@@ -27,8 +31,8 @@ namespace sw { namespace universal {
2731
#if POSIT_FAST_POSIT_128_2
2832
#ifdef _MSC_VER
2933
#pragma message("Fast specialization of posit<128,2>")
30-
//#else
31-
//#warning("Fast specialization of posit<128,2>")
34+
#else
35+
#pragma GCC warning message "Fast specialization of posit<128,2>"
3236
#endif
3337

3438
// fast specialized posit<128,2>

include/universal/number/posit/specialized/posit_128_4.hpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
#if POSIT_FAST_POSIT_128_4
1919
#undef POSIT_FAST_POSIT_128_4
2020
#define POSIT_FAST_POSIT_128_4 0
21+
#ifdef _MSC_VER
2122
#pragma message("Fast specialization of posit<128,4> requested but ignored as fast implemention is TBD")
23+
#else
24+
#pragma GCC warning "Fast specialization of posit<128,4> requested but ignored as fast implemention is TBD"
25+
#endif
2226
#endif
2327

2428
namespace sw { namespace universal {
@@ -27,8 +31,8 @@ namespace sw { namespace universal {
2731
#if POSIT_FAST_POSIT_128_4
2832
#ifdef _MSC_VER
2933
#pragma message("Fast specialization of posit<128,4>")
30-
//#else
31-
//#warning("Fast specialization of posit<128,4>")
34+
#else
35+
#pragme GCC warning message "Fast specialization of posit<128,4>"
3236
#endif
3337

3438
// fast specialized posit<128,4>

include/universal/number/posit/specialized/posit_16_1.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ namespace sw { namespace universal {
2020
#if POSIT_FAST_POSIT_16_1
2121
#ifdef _MSC_VER
2222
#pragma message("Fast specialization of posit<16,1>")
23-
//#else some compile time message that indicates that we are using a specialization for non MS compilers
24-
//#warning("Fast specialization of posit<16,1>")
23+
#else
24+
#pragma message "Fast specialization of posit<16,1>"
2525
#endif
2626

2727
// fast specialized posit<16,1>

include/universal/number/posit/specialized/posit_16_2.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ namespace sw { namespace universal {
2121
#if POSIT_FAST_POSIT_16_2
2222
#ifdef _MSC_VER
2323
#pragma message("Fast specialization of posit<16,2>")
24-
//#else some compile time message that indicates that we are using a specialization for non MS compilers
25-
//#warning("Fast specialization of posit<16,2>")
24+
#else
25+
#pragma message "Fast specialization of posit<16,2>"
2626
#endif
2727

2828
// fast specialized posit<16,2>

include/universal/number/posit/specialized/posit_256_2.hpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
#if POSIT_FAST_POSIT_256_2
1919
#undef POSIT_FAST_POSIT_256_2
2020
#define POSIT_FAST_POSIT_256_2 0
21+
#ifdef _MSC_VER
2122
#pragma message("Fast specialization of posit<256,2> requested but ignored as fast implemention is TBD")
23+
#else
24+
#pragma GCC warning "Fast specialization of posit<256,2> requested but ignored as fast implemention is TBD"
25+
#endif
2226
#endif
2327

2428
namespace sw { namespace universal {
@@ -27,8 +31,8 @@ namespace sw { namespace universal {
2731
#if POSIT_FAST_POSIT_256_2
2832
#ifdef _MSC_VER
2933
#pragma message("Fast specialization of posit<256,2>")
30-
//#else
31-
//#warning("Fast specialization of posit<256,2>")
34+
#else
35+
#pragma GCC warning message "Fast specialization of posit<256,2>"
3236
#endif
3337

3438
// fast specialized posit<256,2>

include/universal/number/posit/specialized/posit_256_5.hpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
#if POSIT_FAST_POSIT_256_5
1919
#undef POSIT_FAST_POSIT_256_5
2020
#define POSIT_FAST_POSIT_256_5 0
21+
#ifdef _MSC_VER
2122
#pragma message("Fast specialization of posit<256,4> requested but ignored as fast implemention is TBD")
23+
#else
24+
#pragma GCC warning "Fast specialization of posit<256,4> requested but ignored as fast implemention is TBD"
25+
#endif
2226
#endif
2327

2428
namespace sw { namespace universal {
@@ -27,8 +31,8 @@ namespace sw { namespace universal {
2731
#if POSIT_FAST_POSIT_256_5
2832
#ifdef _MSC_VER
2933
#pragma message("Fast specialization of posit<256,5>")
30-
//#else
31-
//#warning("Fast specialization of posit<256,5>")
34+
#else
35+
#pragma GCC warning message "Fast specialization of posit<256,5>"
3236
#endif
3337

3438
// fast specialized posit<256,5>

include/universal/number/posit/specialized/posit_2_0.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ namespace sw { namespace universal {
2020
#if POSIT_FAST_POSIT_2_0
2121
#ifdef _MSC_VER
2222
#pragma message("Fast specialization of posit<2,0>")
23-
//#else
24-
//#warning("Fast specialization of posit<2,0>")
23+
#else
24+
#pragma message "Fast specialization of posit<2,0>"
2525
#endif
2626

2727
/* values of a posit<2,0>

include/universal/number/posit/specialized/posit_32_2.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ namespace sw { namespace universal {
2020
#if POSIT_FAST_POSIT_32_2
2121
#ifdef _MSC_VER
2222
#pragma message("Fast specialization of posit<32,2>")
23-
//#else
24-
//#warning("Fast specialization of posit<32,2>")
23+
#else
24+
#pragma message "Fast specialization of posit<32,2>"
2525
#endif
2626

2727
// fast specialized posit<32,2>

include/universal/number/posit/specialized/posit_3_0.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ namespace sw { namespace universal {
1919
#if POSIT_FAST_POSIT_3_0
2020
#ifdef _MSC_VER
2121
#pragma message("Fast specialization of posit<3,0>")
22-
//#else
23-
//#warning("Fast specialization of posit<3,0>")
22+
#else
23+
#pragma message "Fast specialization of posit<3,0>"
2424
#endif
2525

2626
/* values of a posit<3,0>

include/universal/number/posit/specialized/posit_3_1.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ namespace sw { namespace universal {
2020
#if POSIT_FAST_POSIT_3_1
2121
#ifdef _MSC_VER
2222
#pragma message("Fast specialization of posit<3,1>")
23-
//#else
24-
//#warning("Fast specialization of posit<3,1>")
23+
#else
24+
#pragma message "Fast specialization of posit<3,1>"
2525
#endif
2626

2727
constexpr uint8_t posit_3_1_addition_lookup[64] = {

include/universal/number/posit/specialized/posit_48_2.hpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
#if POSIT_FAST_POSIT_48_2
1919
#undef POSIT_FAST_POSIT_48_2
2020
#define POSIT_FAST_POSIT_48_2 0
21+
#ifdef _MSC_VER
2122
#pragma message("Fast specialization of posit<48,2> requested but ignored as fast implemention is TBD")
23+
#else
24+
#pragma GCC warning "Fast specialization of posit<48,2> requested but ignored as fast implemention is TBD"
25+
#endif
2226
#endif
2327

2428
namespace sw { namespace universal {
@@ -27,8 +31,8 @@ namespace sw { namespace universal {
2731
#if POSIT_FAST_POSIT_48_2
2832
#ifdef _MSC_VER
2933
#pragma message("Fast specialization of posit<48,2>")
30-
//#else
31-
//#warning("Fast specialization of posit<48,2>")
34+
#else
35+
#pragma GCC warning message "Fast specialization of posit<48,2>"
3236
#endif
3337

3438
// fast specialized posit<48,2>

include/universal/number/posit/specialized/posit_4_0.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ namespace sw { namespace universal {
2020
#if POSIT_FAST_POSIT_4_0
2121
#ifdef _MSC_VER
2222
#pragma message("Fast specialization of posit<4,0>")
23-
//#else
24-
//#warning("Fast specialization of posit<4,0>")
23+
#else
24+
#pragma message "Fast specialization of posit<4,0>"
2525
#endif
2626

2727
constexpr uint8_t posit_4_0_addition_lookup[256] = {

include/universal/number/posit/specialized/posit_64_2.hpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
#if POSIT_FAST_POSIT_64_2
1919
#undef POSIT_FAST_POSIT_64_2
2020
#define POSIT_FAST_POSIT_64_2 0
21+
#ifdef _MSC_VER
2122
#pragma message("Fast specialization of posit<64,2> requested but ignored as fast implemention is TBD")
23+
#else
24+
#pragma GCC warning "Fast specialization of posit<64,2> requested but ignored as fast implemention is TBD"
25+
#endif
2226
#endif
2327

2428
namespace sw { namespace universal {
@@ -27,8 +31,8 @@ namespace sw { namespace universal {
2731
#if POSIT_FAST_POSIT_64_2
2832
#ifdef _MSC_VER
2933
#pragma message("Fast specialization of posit<64,2>")
30-
//#else
31-
//#warning("Fast specialization of posit<64,2>")
34+
#else
35+
#pragma GCC warning message "Fast specialization of posit<64,2>"
3236
#endif
3337

3438
// fast specialized posit<64,2>

include/universal/number/posit/specialized/posit_64_3.hpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
#if POSIT_FAST_POSIT_64_3
1919
#undef POSIT_FAST_POSIT_64_3
2020
#define POSIT_FAST_POSIT_64_3 0
21+
#ifdef _MSC_VER
2122
#pragma message("Fast specialization of posit<64,3> requested but ignored as fast implemention is TBD")
23+
#else
24+
#pragma GCC warning "Fast specialization of posit<64,3> requested but ignored as fast implemention is TBD"
25+
#endif
2226
#endif
2327

2428
namespace sw { namespace universal {
@@ -27,8 +31,8 @@ namespace sw { namespace universal {
2731
#if POSIT_FAST_POSIT_64_3
2832
#ifdef _MSC_VER
2933
#pragma message("Fast specialization of posit<64,3>")
30-
//#else
31-
//#warning("Fast specialization of posit<64,3>")
34+
#else
35+
#pragma GCC warning message "Fast specialization of posit<64,3>"
3236
#endif
3337

3438
// fast specialized posit<64,3>

include/universal/number/posit/specialized/posit_8_0.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ namespace sw { namespace universal {
2020
#if POSIT_FAST_POSIT_8_0
2121
#ifdef _MSC_VER
2222
#pragma message("Fast specialization of posit<8,0>")
23-
//#else some compile time message that indicates that we are using a specialization for non MS compilers
24-
//#warning("Fast specialization of posit<8,0>")
23+
#else
24+
#pragma message "Fast specialization of posit<8,0>"
2525
#endif
2626

2727
// injecting the C API into namespace sw::universal

include/universal/number/posit/specialized/posit_8_1.hpp

+4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
#if POSIT_FAST_POSIT_8_1
1919
#undef POSIT_FAST_POSIT_8_1
2020
#define POSIT_FAST_POSIT_8_1 0
21+
#ifdef _MSC_VER
2122
#pragma message("Fast specialization of posit<8,1> requested but ignored as fast implemention is TBD")
23+
#else
24+
#pragma GCC warning "Fast specialization of posit<8,1> requested but ignored as fast implemention is TBD"
25+
#endif
2226
#endif
2327

2428
namespace sw { namespace universal {

include/universal/number/posit/specialized/posit_8_2.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ namespace sw { namespace universal {
2222
#if POSIT_FAST_POSIT_8_2
2323
#ifdef _MSC_VER
2424
#pragma message("Fast specialization of posit<8,2>")
25-
//#else some compile time message that indicates that we are using a specialization for non MS compilers
26-
//#warning("Fast specialization of posit<8,2>")
25+
#else
26+
#pragma message "Fast specialization of posit<8,2>"
2727
#endif
2828

2929
// fast specialized posit<8,2>

0 commit comments

Comments
 (0)