This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

Re: [RFA/commit] Remove use of stdbool.h in GDB sources.


On 02/27/2015 08:53 AM, Joel Brobecker wrote:
> Hello,
> 
> Using type bool from stdbool unfortunately causes problems trying
> to build GDB on AiX and Solaris:

Darn...


> But, thinking beyond this very specific issue, it shows that using
> stdbool.h is going to cause problems on these systems until either
> GCC fixes those includes in a way that makes them work (not really
> an option in the short term); or we switch to C++.

> 
> In the meantime, I think the path of least resistance is to revert
> the use of stdbool.h, and use integers, the way we've done up until
> now. The benefits of using type "bool" are modest, IMO, so not
> a great loss, and a temporary one.

I agree.

> 
> gdb/ChangeLog:
> 
>         * utils.h: Remove <stdbool.h> #include.
>         (producer_is_gcc): Change return type to "int".
>         * utils.c (producer_is_gcc): Change return type to int.
>         Return 1 instead of true, and 0 instead of false.
>         Adjust function documentation accordingly.
> 
> I will push this patch in the next few days, unless there are
> objections.

No objections here.

(guess we should reinstate the ARI bool rule too then.)

Thanks,
Pedro Alves


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