On Fri, Nov 16, 2012 at 9:52 AM, Jakub Jelinek <ja...@redhat.com> wrote:
>> 2012-11-16 Uros Bizjak <ubiz...@gmail.com> >> >> * lib/target_suports.exp >> (check_effective_target_has_w_floating_suffix): New procedure. >> (check_effective_target_has_q_floating_suffix): Ditto. >> * g++.dg/cpp0x/gnu_fext-numeric-literals.C: Add dg-error directive >> for unsupported non-standard suffix on floating constant. >> * g++.dg/cpp0x/std_fext-numeric-literals.C: Ditto. >> >> Attached patch was re-tested on alphaev68-linux-gnu and >> x86_64-linux-gnu and committed to mainline SVN. > > Perhaps just bike-shed, but I'd write it as: Actually, a very good idea! I will commit the following addendum when alpha finishes testing: --cut here-- Index: target-supports.exp =================================================================== --- target-supports.exp (revision 193551) +++ target-supports.exp (working copy) @@ -1746,18 +1746,26 @@ # 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. --cut here-- Thanks, Uros.