build error on head overnight

Daniel Jacobowitz drow@false.org
Mon May 18 17:01:00 GMT 2009


On Mon, May 18, 2009 at 10:46:58AM -0600, Tom Tromey wrote:
> >>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:
> 
> Daniel> I thought what we'd done here was valid C,
> Daniel> though... maybe some change in the C++ compatibility checking
> Daniel> that Ian has been working on in gcc-land affected this.
> 
> I also think it is valid C, albeit a bit unusual.
> I think we should disable this new warning.

I checked with Ian about this and the compiler is behaving as
intended.  Excerpt from:

  http://gcc.gnu.org/ml/gcc-patches/2009-04/msg00003.html

  This patch enables -Wenum-compare for C.  It permits the C compiler to
  warn about comparisons between two different enum types.

  Such comparisons are almost invariably a mistake.  Therefore, with
  this patch the warning is enabled by default when using -Wall.

Ian's comment was "A hack like this deserves a type cast" and I can't
quite find it in myself to disagree :-)

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb mailing list