From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25124 invoked by alias); 4 Feb 2011 07:17:30 -0000 Received: (qmail 25112 invoked by uid 22791); 4 Feb 2011 07:17:29 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Feb 2011 07:17:26 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/47605] New: Document that C_Bool might be the wrong constant for C Booleans X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: documentation X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Fri, 04 Feb 2011 07:17:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-02/txt/msg00623.txt.bz2 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: unassigned@gcc.gnu.org ReportedBy: burnus@gcc.gnu.org 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