* lib/target-supports.exp
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Nov 2012 14:53:53 +0000 (14:53 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Nov 2012 14:53:53 +0000 (14:53 +0000)
(check_effective_target_has_w_floating_suffix): Use options for c++ only.
(check_effective_target_has_q_floating_suffix): Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193559 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/lib/target-supports.exp

index 184e161..af7fb94 100644 (file)
@@ -1746,18 +1746,26 @@ proc check_effective_target_double64plus { } {
 # 0 otherwise.
 
 proc check_effective_target_has_w_floating_suffix { } {
+    set opts ""
+    if [check_effective_target_c++] {
+        append opts "-std=gnu++03"
+    }
     return [check_no_compiler_messages w_fp_suffix object {
        float dummy = 1.0w;
-    } "-std=gnu++03 -w"]
+    } "$opts"]
 }
 
 # Return 1 if the target supports 'q' suffix on floating constant
 # 0 otherwise.
 
 proc check_effective_target_has_q_floating_suffix { } {
+    set opts ""
+    if [check_effective_target_c++] {
+        append opts "-std=gnu++03"
+    }
     return [check_no_compiler_messages q_fp_suffix object {
        float dummy = 1.0q;
-    } "-std=gnu++03 -w"]
+    } "$opts"]
 }
 # Return 1 if the target supports compiling fixed-point,
 # 0 otherwise.