This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Unreviewed gcov patch


> On Apr 6, 2005, at 3:59 PM, Richard Sandiford wrote:
> 
> [ Dale: I notice that your recent value-prof.c patch uses 0xffffffffull
>  in a call to build_int_cst_wide.  I guess that needs to be changed
>  to be compatible with C90. ]
>
> - tree_val = build_int_cst_wide (GCOV_TYPE_NODE, val & 0xffffffffull,
>   val >> > 32);
> + tree_val = build_int_cst_wide (get_gcov_type (),
> + val & 0xffffffffull, val >> 32);
>
> As well as breaking when sizeof(gcov_type) != 64.
>  Memory is stirring; I never liked this bit, and it's one reason I never
> tried to put this in mainline myself. However I don't know how to do this
> in conformant fashion.
>
> If some host didn't accept 0xffffffffull, I would expect that to show up as
> a build time compiler error. Nobody's reported such an error. Perhaps it is
> actually safe at this point

- it can't be safe, as >> 32 for a 32-bit value is also meaningless; so
  could seem that the expression should be corrected to be based on the
  sizeof( gcov_type ), (as nor should it be presumed that long-long >= 64).




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]