[PATCH][benchtests] Use benchmark framework for strtod

Siddhesh Poyarekar siddhesh@redhat.com
Wed Dec 4 12:59:00 GMT 2013


On Wed, Dec 04, 2013 at 09:54:57AM -0200, Adhemerval Zanella wrote:
> Hi Siddhesh,
> 
> With this patch, I'm seeing some compilations errors when issuing 'make bench':
> 

Sorry, I think I forgot to explicitly mention that this patch needs
the following patch too:

https://sourceware.org/ml/libc-alpha/2013-12/msg00122.html

The compilation error looks like something I'd see if this patch
wasn't included.  Could you please confirm?

Thanks,
Siddhesh

> error: expected identifier or ‘(’ before ‘<’ token
>  struct args { volatile const char * arg0; volatile <char **> arg1;};
>                                                     ^
> /home/azanella/glibc/build/glibc64_power7/benchtests/bench-strtod.c:3:67: warning: no semicolon at end of struct or union [enabled by default]
>  struct args { volatile const char * arg0; volatile <char **> arg1;};
>                                                                    ^
> ./bench-skeleton.c: In function ‘main’:
> /home/azanella/glibc/build/glibc64_power7/benchtests/bench-strtod.c:2:81: error: ‘struct args’ has no member named ‘arg1’
>  #define CALL_BENCH_FUNC(v, i) strtod ( variants[v].in[i].arg0, variants[v].in[i].arg1);
>                                                                                  ^
> /home/azanella/glibc/build/glibc64_power7/benchtests/bench-strtod.c:75:35: note: in expansion of macro ‘CALL_BENCH_FUNC’
>  #define BENCH_FUNC(i, j) ({ret =  CALL_BENCH_FUNC (i, j);})
>                                    ^
> ./bench-skeleton.c:77:3: note: in expansion of macro ‘BENCH_FUNC’
>    BENCH_FUNC (v, i);
>    ^
> In file included from /home/azanella/glibc/build/glibc64_power7/benchtests/bench-strtod.c:77:0:
> ./bench-skeleton.c:77:3: warning: passing argument 1 of ‘strtod’ discards ‘volatile’ qualifier from pointer target type [enabled by default]
> In file included from ../include/stdlib.h:10:0,
>                  from /home/azanella/glibc/build/glibc64_power7/benchtests/bench-strtod.c:1:
> ../stdlib/stdlib.h:164:15: note: expected ‘const char * restrict’ but argument is of type ‘const volatile char *’
>  extern double strtod (const char *__restrict __nptr,
>                ^
> make[1]: *** [/home/azanella/glibc/build/glibc64_power7/benchtests/bench-strtod.o] Error 1
> 



More information about the Libc-alpha mailing list