[PATCH] sim: dv-cfi: include stdbool.h

Joel Brobecker brobecker@adacore.com
Tue Oct 18 00:16:00 GMT 2011


> >> #ifdef HAVE_STDBOOL_H
> >> # include <stdbool.h>
> >> #else
> >> # define bool int
> >> # define true 1
> >> # define false 0
> >> #endif
> 
> Joel> I don't know what the others feel about this, I'm always wary of
> Joel> this, but maybe I'm too paranoid. I remember using these sorts of
> Joel> defines, and getting into portability issues, but that was a very
> Joel> long time ago, and I don't remember the details. Perhaps I didn't
> Joel> do something right, or it's now OBE.
> 
> GCC has done this for years and years.
> I think it has been a net positive for code readability.

OK, then it's fine for me as well.

-- 
Joel



More information about the Gdb-patches mailing list