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] |
Other format: | [Raw text] |
On Mar 21 2013, Joseph S. Myers wrote:
> > > now that the Fortran frontend is C++ we can use the primitive bool> > type instead of inventing our own.> > Well, C99's "bool" (_Bool) was already used before. ...Er, that is making a serious mistake or, at least, running the risk of one. C++'s bool and C99's _Bool are NOT compatible types. The UK tried to get _Bool either made compatible with C++ or (preferably) dropped, but failed in both.They have been ABI-compatible in GCC ever since I implemented C99 _Bool ....
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. Regards, Nick Maclaren.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |