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] |
Jakub Jelinek wrote: > On Mon, Nov 01, 2004 at 09:19:33PM +1300, Danny Smith wrote: >> Hello, >> >> Two problems I ran into with >> testsuite/gcc.dg/compat/struct-layout-1_generate.c >> >> 1) ffsll() is not available on all targets. We could supply a >> my_ffsll but __builtin_ffsll does the job too. > > This is IMO not ok. gcc.dg/compat should be buildable even with older > compilers, so that one can compare compatibility easily. It is not > as bad because it is in the generator only, but still you from time > to time want to just pack up the whole gcc.dg/compat tree and use it > e.g. in GCC 3.3 or earlier. > Either use: > #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) > mi = __builtin_ffsll (...) - 1; > #else > mi = ffsll (...) - 1; > #endif > or write my_ffsll. > OK, what about attached: Danny testsuite/ChangeLog 2004-11-02 Danny Smith <dannysmith@users.sourceforge.net> * gcc.dg/compat/struct-layout-1_generate.c (main): Generate a call to fflush(stdout) before abort. (my_ffsll): New function. (generate_fields): Use it.
Attachment:
struct-layout-1_generate.c.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |