===================================================================
@@ -1742,6 +1742,23 @@
}]
}
+# Return 1 if the target supports 'w' suffix on floating constant
+# 0 otherwise.
+
+proc check_effective_target_has_w_floating_suffix { } {
+ return [check_no_compiler_messages w_fp_suffix object {
+ float dummy = 1.0w;
+ } "-std=gnu++03 -w"]
+}
+
+# Return 1 if the target supports 'q' suffix on floating constant
+# 0 otherwise.
+
+proc check_effective_target_has_q_floating_suffix { } {
+ return [check_no_compiler_messages q_fp_suffix object {
+ float dummy = 1.0q;
+ } "-std=gnu++03 -w"]
+}
# Return 1 if the target supports compiling fixed-point,
# 0 otherwise.
===================================================================
@@ -91,10 +91,10 @@
auto rfp = 1.0r; // { dg-error "fixed-point types not supported" }
auto Rfp = 1.0R; // { dg-error "fixed-point types not supported" }
- auto wfp = 1.0w;
- auto Wfp = 1.0W;
- auto qfp = 1.0q;
- auto Qfp = 1.0Q;
+ auto wfp = 1.0w; // { dg-error "unsupported" "" { target { ! has_w_floating_suffix } } }
+ auto Wfp = 1.0W; // { dg-error "unsupported" "" { target { ! has_w_floating_suffix } } }
+ auto qfp = 1.0q; // { dg-error "unsupported" "" { target { ! has_q_floating_suffix } } }
+ auto Qfp = 1.0Q; // { dg-error "unsupported" "" { target { ! has_q_floating_suffix } } }
}
// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 7 }
===================================================================
@@ -91,10 +91,10 @@
auto rfp = 1.0r; // { dg-error "fixed-point types not supported" }
auto Rfp = 1.0R; // { dg-error "fixed-point types not supported" }
- auto wfp = 1.0w;
- auto Wfp = 1.0W;
- auto qfp = 1.0q;
- auto Qfp = 1.0Q;
+ auto wfp = 1.0w; // { dg-error "unsupported" "" { target { ! has_w_floating_suffix } } }
+ auto Wfp = 1.0W; // { dg-error "unsupported" "" { target { ! has_w_floating_suffix } } }
+ auto qfp = 1.0q; // { dg-error "unsupported" "" { target { ! has_q_floating_suffix } } }
+ auto Qfp = 1.0Q; // { dg-error "unsupported" "" { target { ! has_q_floating_suffix } } }
}
// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 7 }