http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47605
Summary: Document that C_Bool might be the wrong constant for C
Booleans
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: documentation
Severity: normal
Priority: P3
Component: fortran
AssignedTo: [email protected]
ReportedBy: [email protected]
James pointed out the following at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/3c2784c55d402ced
c_bool is typically one byte wide, and c_int 4. That means: Most C programs -
except of those few which explicitly use _Bool, use a 4 byte and not a 1 byte
Boolean variables.
I think one should put a warning into the manual - either in the C Binding part
[1] or in the section about the ISO C Binding constants [2], or in both.
[1] http://gcc.gnu.org/onlinedocs/gfortran/Intrinsic-Types.html
[2]http://gcc.gnu.org/onlinedocs/gfortran/ISO_005fC_005fBINDING.html