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]

Re: In C, enum types may be unsigned, but enum constants may not



  In message <orvgxwxo82.fsf@guarana.lsd.ic.unicamp.br>you write:
  > On Jul 23, 2000, Jeffrey A Law <law@cygnus.com> wrote:
  > 
  > >> enum foo { FOO, BAR };
  > [snip]
  > >>   int i;
  > >>   for (i = BAR; i >= FOO; --i)
  > >>     if (i == -1)
  > >>       abort ();
  > 
  > > What is the failure mode?  An infinite loop?
  > 
  > It would have been, if I hadn't introduced the if()abort().
OK.  then go ahead and check it in as an xfailed test if it's still
failing.

jeff


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