On Wed, Dec 12, 2012 at 7:25 AM, Richard Biener <rguent...@suse.de> wrote: > On Wed, 12 Dec 2012, Teresa Johnson wrote: > >> On Wed, Dec 12, 2012 at 2:21 AM, Steven Bosscher <stevenb....@gmail.com> >> wrote: >> > On Wed, Dec 12, 2012 at 6:07 AM, Aldy Hernandez wrote: >> >> I don't know how much of this is a fool's errand, and if we want to commit >> >> to supporting < GCC 3.4, but your patch suggested c++98, and GCC 3.2 >> >> claims >> >> such. >> > >> > GCC 3.2 claims many things, but any GCC that has the old C++ parser >> > has known non-conformances. IMHO we should only support GCC versions >> > with the "new" C++ parser, i.e. GCC 3.4 and up. >> > >> > >> >> Perhaps we could even deprecate ARG_UNUSED? >> > >> > +1 >> > >> > >> >> 2. gcov-io.c uses __builtin_popcountll and __builtin_clzll. Older >> >> GCC's do not have this. For that matter, how does this even work on >> >> non-GCC systems? >> > >> > This'd be a bug. >> > >> > >> >> I really don't want to spend much more time on this, but at the same >> >> time, I >> >> don't want to throw away a day's work, especially if it could conceivably >> >> help us with (older) non-GCC bootstrap compilers. >> > >> > I think the work you've done here is great, but even if you'd fix >> > these issues, there is very little that can be done to avoid the same >> > mistakes, or new ones, creeping back in and breaking builds with older >> > compilers. >> > >> > >> >> What are your thoughts on this? >> > >> > At least: Thanks for uncovering the gcov-io.c bug :-) >> >> Yes, thanks for fixing this. The fix looks good to me. > > In fact it looks ugly ... can't we avoid this code duplication somehow?
If you prefer, I can simply inline the popcount/clz functionality into gcov-io.c directly (or at least when not using recent versions of GCC). But that in fact would be duplicating the code, when I thought Aldy's solution was trying to avoid that by providing the more general interfaces. Teresa > > Richard. -- Teresa Johnson | Software Engineer | tejohn...@google.com | 408-460-2413