This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran, 4.9] Use bool type instead gfc_try
- From: Miles Bader <miles at gnu dot org>
- To: "N.M. Maclaren" <nmm1 at cam dot ac dot uk>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 22 Mar 2013 17:31:28 +0900
- Subject: Re: [Patch, fortran, 4.9] Use bool type instead gfc_try
- References: <CAO9iq9F0rhbqe-LMB1d=0pNyKraPK_KVKc2Tg1j2EP8Zu+EUgA at mail dot gmail dot com> <5148A0A0 dot 8010209 at net-b dot de> <Prayer dot 1 dot 3 dot 5 dot 1303212205310 dot 2429 at hermes-1 dot csi dot cam dot ac dot uk> <Pine dot LNX dot 4 dot 64 dot 1303212333510 dot 12788 at digraph dot polyomino dot org dot uk> <Prayer dot 1 dot 3 dot 5 dot 1303220818260 dot 8781 at hermes-1 dot csi dot cam dot ac dot uk>
"N.M. Maclaren" <nmm1@cam.ac.uk> writes:
> That is another matter entirely. The code of gcc/gfortran is supposed
> to be compilable with other compilers, and it is foolish to make
> unnecessary assumptions by relying on undefined behaviour.
>
> The simple facts are that C++ does NOT define bool to be compatible with
> _Bool, and there are enough differences in specification and semantics
> to make it likely that they are not the same in at least some compilers.
> This mess has caused and still causes no end of problems for Fortran
> interoperability and in standards like MPI.
Er, maybe so, but is there actually an issue in _this_ case?
>From original message, it sounds like these are internal compiler
interfaces, so all that matters is that they be self-consistent, and
there's no external ABI involved... So as long as all the code in
question is compiled with C++ and uses C++ bool, or is compiled with
C99 and uses _Bool, and doesn't use any functionality that isn't in
the intersection of those two types, there shouldn't be any problem,
right?
-miles
--
Congratulation, n. The civility of envy.
- References:
- [Patch, fortran, 4.9] Use bool type instead gfc_try
- Re: [Patch, fortran, 4.9] Use bool type instead gfc_try
- Re: [Patch, fortran, 4.9] Use bool type instead gfc_try
- Re: [Patch, fortran, 4.9] Use bool type instead gfc_try
- Re: [Patch, fortran, 4.9] Use bool type instead gfc_try