libstdc++.exp patch

Paolo Carlini paolo.carlini@oracle.com
Fri Apr 22 15:06:00 GMT 2011


Hi,
>
>     Here is the patch I submitted some months ago before 4.6.0 release.
>
> 2011-04-21  François Dumont <francois.cppdevs@free.fr>
>
>         * testsuite/lib/libstdc++.exp (check_v3_target_time): Discard
>         unused compilation result thanks to /dev/null.
>         * testsuite/lib/libstdc++.exp (check_v3_target_debug_mode
>         check_v3_target_profile_mode check_v3_target_normal_mode
>         check_v3_target_cstdint check_v3_target_cmath
>         check_v3_target_atomic_builtins check_v3_target_gthreads
>         check_v3_target_nanosleep check_v3_target_sched_yield
>         check_v3_target_string_conversions check_v3_target_swprintf
>         check_v3_target_binary_io): Use simple preprocessing rather than
>         compilation. Discard unused preprocessing result thanks to 
> /dev/null.
>
>     My only concern regarding this patch is on the portability of 
> /dev/null.
I would say it's Ok: in acinclude.m4 we have quite a few of /dev/null 
and nobody complained so far. I'm adding Ralf in CC, I trust his opinion 
about portability issues (in particular ;)
> I also wonder if check_v3_target_time could not simply use the object 
> or even assembly target rather than executable, what do you think ?
Can you figure out when / why it has been added? Because that function 
is C89 and should be unconditionally available. If we have the test, 
likely it's because of some target I'm not familiar with, which can well 
declare time it in <time.h> and then end up not providing it in the 
library, thus the failure happens at *link* time... (would not be the 
fist time we have to live with this kind of annoying situation)

Paolo.



More information about the Libstdc++ mailing list